Bug 20535 - cproto generates endless errors,in header files
Summary: cproto generates endless errors,in header files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cproto
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
: 21684 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-08 19:45 UTC by Bob Stafford
Modified: 2014-03-17 02:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-11-08 19:45:59 UTC
Embargoed:


Attachments (Terms of Use)
Patch for gcc builtins, activate with --enable-gcc-builtins, .spec file not updated (30.80 KB, patch)
2001-07-15 15:00 UTC, Urban Widmark
no flags Details | Diff

Description Bob Stafford 2000-11-08 19:45:57 UTC
Running cproto on the following program

#include <stdio.h>
 
int main()
{
        printf("hello world!\n");
}


generates the following errors, on a real program the errors are much worse
and are found in many more header files. As far as I can tell the C
compiler has no problem parsing any of my code.

/* hello.c */
"/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h", line 43: parse
error at token '__builtin_va_list'
Expected: auto bool char complex define-name double enum extension extern
... void
"/usr/include/libio.h", line 459: parse error at token '__gnuc_va_list'
Expected: ... auto bool char complex define-name double enum extension ...
void
"/usr/include/libio.h", line 461: parse error at token '__gnuc_va_list'
Expected: ... auto bool char complex define-name double enum extension ...
void
"/usr/include/stdio.h", line 276: parse error at token '__gnuc_va_list'
Expected: ... auto bool char complex define-name double enum extension ...
void
"/usr/include/stdio.h", line 278: parse error at token '__gnuc_va_list'
Expected: ... auto bool char complex define-name double enum extension ...
void
"/usr/include/stdio.h", line 282: parse error at token '__gnuc_va_list'
Expected: ... auto bool char complex define-name double enum extension ...
void
"/usr/include/stdio.h", line 291: parse error at token '__gnuc_va_list'
Expected: ... auto bool char complex define-name double enum extension ...
void
"/usr/include/stdio.h", line 294: parse error at token '__gnuc_va_list'
Expected: ... auto bool char complex define-name double enum extension ...
void
int main(void);

Comment 1 Bill Nottingham 2000-11-13 20:36:05 UTC
Fixed in cproto-4.6-6, will be in next rawhide release.

Comment 2 Bill Nottingham 2000-12-05 16:03:51 UTC
*** Bug 21684 has been marked as a duplicate of this bug. ***

Comment 3 Urban Widmark 2001-07-15 14:58:34 UTC
As far as I can tell this is not working, at least not for all configs.
I get the exact same thing on a RH7.1. The errors appear harmless, but are ugly.

Relevant RPMs:
gcc-2.96-85
cpp-2.96-85
glibc-2.2.2-10
cproto-4.6-8 (from Rawhide, the default 4.6-7 has the same problem)

cproto's config.h does have what the src.rpm changelog suggests as the solution
#define CPP     "/lib/cpp -U__THROW" 


There is a different version (4.6d) at ftp://dickey.his.com/cproto, the URL in
the src.rpm leads nowhere. That version has the same problem.

The problem is a gcc builtin symbol, __builtin_va_list, and it appears that you
can shut it up by simply defining that symbol.
[... making patch ...]

/Urban


Comment 4 Urban Widmark 2001-07-15 15:00:30 UTC
Created attachment 23629 [details]
Patch for gcc builtins, activate with --enable-gcc-builtins, .spec file not updated


Note You need to log in before you can comment on or make changes to this bug.