This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug regex/1220] regex uses old-style definitions that cause g++ to fail


------- Additional Comments From bruno at clisp dot org  2006-04-19 17:43 -------
Ulrich Drepper wrote: 
> Using K&R function definitions ensures that the compiler warns about 
> missing prototypes.  This is finer grained than a compiler can achieve this. 
 
Wrong. gcc has two options that warn for missing prototypes, even when ANSI/ISO 
C 
function definitions are used: -Wmissing-prototypes and -Wmissing-declarations. 
 
Look: 
============================== foo.c ========================= 
int foo(int, int); 
int foo (int x, int y) { return x + y; } 
 
int no_prototype (int x, int y) { return x + y; } 
============================================================ 
$ gcc -Wmissing-declarations -c foo.c 
foo.c:4: warning: no previous declaration for `no_prototype' 
$ gcc -Wmissing-prototypes -c foo.c 
foo.c:4: warning: no previous prototype for `no_prototype' 
 
> It is simply wrong to use g++ to compile regex.c.  Period. 
 
Your attitude hampers the reuse of the code in GNU clisp. Saying "Period" 
is not a sound technical argument. I'm therefore reopening this issue. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |


http://sourceware.org/bugzilla/show_bug.cgi?id=1220

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]