public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail
@ 2005-08-20 7:26 eggert at gnu dot org
2005-08-20 7:26 ` [Bug regex/1220] " eggert at gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2005-08-20 7:26 UTC (permalink / raw)
To: glibc-bugs-regex
regex uses old (K&R) style function definitions, which causes
problems when it is compiled using g++ outside of glibc. For example:
g++ -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type
-Wno-sign-compare -Wno-invalid-offsetof -g -DUNICODE -I. -I. -I..
-DHAVE_CONFIG_H -c regex.c
In file included from regex.c:85:
regex_internal.c:46: error: `reg_errcode_t re_string_allocate' redeclared as
different kind of symbol
regex_internal.h:383: error: previous declaration of `reg_errcode_t
re_string_allocate(re_string_t*, const char*, int, int, char*, int, const
re_dfa_t*)'
For more details about the g++ problem, please see Sam Steingold's bug report
<http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00096.html>.
These days there's no longer any reason for regex to use K&R function
definition syntax, so I'm installing the attached patch into gnulib. Can you
please propagate this into glibc? Thanks.
--
Summary: regex uses old-style definitions that cause g++ to fail
Product: glibc
Version: 2.3.5
Status: NEW
Severity: normal
Priority: P2
Component: regex
AssignedTo: gotom at debian dot or dot jp
ReportedBy: eggert at gnu dot org
CC: glibc-bugs-regex at sources dot redhat dot com,glibc-
bugs at sources dot redhat dot com
http://sources.redhat.com/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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
@ 2005-08-20 7:26 ` eggert at gnu dot org
2005-08-20 7:28 ` eggert at gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2005-08-20 7:26 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From eggert at gnu dot org 2005-08-20 07:26 -------
Created an attachment (id=597)
--> (http://sources.redhat.com/bugzilla/attachment.cgi?id=597&action=view)
use function prototypes for definitions
--
http://sources.redhat.com/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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
2005-08-20 7:26 ` [Bug regex/1220] " eggert at gnu dot org
@ 2005-08-20 7:28 ` eggert at gnu dot org
2005-08-20 7:32 ` eggert at gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2005-08-20 7:28 UTC (permalink / raw)
To: glibc-bugs-regex
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |1217
http://sources.redhat.com/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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
2005-08-20 7:26 ` [Bug regex/1220] " eggert at gnu dot org
2005-08-20 7:28 ` eggert at gnu dot org
@ 2005-08-20 7:32 ` eggert at gnu dot org
2005-08-21 0:25 ` eggert at gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2005-08-20 7:32 UTC (permalink / raw)
To: glibc-bugs-regex
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |1221
nThis| |
http://sources.redhat.com/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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
` (2 preceding siblings ...)
2005-08-20 7:32 ` eggert at gnu dot org
@ 2005-08-21 0:25 ` eggert at gnu dot org
2005-08-23 18:28 ` eggert at gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2005-08-21 0:25 UTC (permalink / raw)
To: glibc-bugs-regex
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |1224
nThis| |
http://sources.redhat.com/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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
` (3 preceding siblings ...)
2005-08-21 0:25 ` eggert at gnu dot org
@ 2005-08-23 18:28 ` eggert at gnu dot org
2005-08-31 22:43 ` eggert at gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2005-08-23 18:28 UTC (permalink / raw)
To: glibc-bugs-regex
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |1231
nThis| |
http://sources.redhat.com/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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
` (4 preceding siblings ...)
2005-08-23 18:28 ` eggert at gnu dot org
@ 2005-08-31 22:43 ` eggert at gnu dot org
2005-09-06 18:04 ` drepper at redhat dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2005-08-31 22:43 UTC (permalink / raw)
To: glibc-bugs-regex
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |1281
nThis| |
http://sources.redhat.com/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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
` (5 preceding siblings ...)
2005-08-31 22:43 ` eggert at gnu dot org
@ 2005-09-06 18:04 ` drepper at redhat dot com
2005-09-06 18:11 ` drepper at redhat dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: drepper at redhat dot com @ 2005-09-06 18:04 UTC (permalink / raw)
To: glibc-bugs-regex
--
Bug 1220 depends on bug 1217, which changed state.
Bug 1217 Summary: regcomp.c elicits uninitialized-variable warnings with GCC 4
http://sourceware.org/bugzilla/show_bug.cgi?id=1217
What |Old Value |New Value
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
` (6 preceding siblings ...)
2005-09-06 18:04 ` drepper at redhat dot com
@ 2005-09-06 18:11 ` drepper at redhat dot com
2006-04-19 17:43 ` bruno at clisp dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: drepper at redhat dot com @ 2005-09-06 18:11 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From drepper at redhat dot com 2005-09-06 18:10 -------
> These days there's no longer any reason for regex to use K&R function
> definition syntax,
Wrong. Using K&R function definitions ensures that the compiler warns about
missing prototypes. This is finer grained than a compiler can achieve this.
It is simply wrong to use g++ to compile regex.c. Period.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
` (7 preceding siblings ...)
2005-09-06 18:11 ` drepper at redhat dot com
@ 2006-04-19 17:43 ` bruno at clisp dot org
2006-04-19 17:44 ` bruno at clisp dot org
2006-04-25 18:01 ` drepper at redhat dot com
10 siblings, 0 replies; 12+ messages in thread
From: bruno at clisp dot org @ 2006-04-19 17:43 UTC (permalink / raw)
To: glibc-bugs-regex
------- 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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
` (8 preceding siblings ...)
2006-04-19 17:43 ` bruno at clisp dot org
@ 2006-04-19 17:44 ` bruno at clisp dot org
2006-04-25 18:01 ` drepper at redhat dot com
10 siblings, 0 replies; 12+ messages in thread
From: bruno at clisp dot org @ 2006-04-19 17:44 UTC (permalink / raw)
To: glibc-bugs-regex
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |bruno at clisp dot org
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regex/1220] regex uses old-style definitions that cause g++ to fail
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
` (9 preceding siblings ...)
2006-04-19 17:44 ` bruno at clisp dot org
@ 2006-04-25 18:01 ` drepper at redhat dot com
10 siblings, 0 replies; 12+ messages in thread
From: drepper at redhat dot com @ 2006-04-25 18:01 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From drepper at redhat dot com 2006-04-25 18:01 -------
Stop reopening the bug. This is all valid C code. Everybody who misuses the
code is on her/his own.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-04-25 18:01 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-20 7:26 [Bug regex/1220] New: regex uses old-style definitions that cause g++ to fail eggert at gnu dot org
2005-08-20 7:26 ` [Bug regex/1220] " eggert at gnu dot org
2005-08-20 7:28 ` eggert at gnu dot org
2005-08-20 7:32 ` eggert at gnu dot org
2005-08-21 0:25 ` eggert at gnu dot org
2005-08-23 18:28 ` eggert at gnu dot org
2005-08-31 22:43 ` eggert at gnu dot org
2005-09-06 18:04 ` drepper at redhat dot com
2005-09-06 18:11 ` drepper at redhat dot com
2006-04-19 17:43 ` bruno at clisp dot org
2006-04-19 17:44 ` bruno at clisp dot org
2006-04-25 18:01 ` drepper at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).