This is the mail archive of the
glibc-bugs-regex@sourceware.org
mailing list for the glibc project.
[Bug regex/1220] regex uses old-style definitions that cause g++ to fail
- From: "bruno at clisp dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs-regex at sources dot redhat dot com
- Date: 19 Apr 2006 17:43:23 -0000
- Subject: [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
- References: <20050820072603.1220.eggert@gnu.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.