Bug 20535 - cproto generates endless errors,in header files
cproto generates endless errors,in header files
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: cproto (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
: 21684 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-08 14:45 EST by Bob Stafford
Modified: 2014-03-16 22:17 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-08 14:45:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Bob Stafford 2000-11-08 14:45:57 EST
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 15:36:05 EST
Fixed in cproto-4.6-6, will be in next rawhide release.
Comment 2 Bill Nottingham 2000-12-05 11:03:51 EST
*** Bug 21684 has been marked as a duplicate of this bug. ***
Comment 3 Urban Widmark 2001-07-15 10:58:34 EDT
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 11:00:30 EDT
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.