Bug 20535

Summary: cproto generates endless errors,in header files
Product: [Retired] Red Hat Linux Reporter: Bob Stafford <bobstaff>
Component: cprotoAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-11-08 19:45:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for gcc builtins, activate with --enable-gcc-builtins, .spec file not updated none

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