public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/1201] New: regex.h problem when compiling with g++
@ 2005-08-16 0:01 eggert at gnu dot org
2005-08-16 0:01 ` [Bug regex/1201] " eggert at gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: eggert at gnu dot org @ 2005-08-16 0:01 UTC (permalink / raw)
To: glibc-bugs-regex
This bug report follows up on a gnulib bug whose patch is here:
http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00003.html
The problem is that when g++ is used to compile regex.h in the gnulib
context, it gets the diagnostics:
regex.h:569: error: expected primary-expression before "__restrict__"
regex.h:569: error: expected `]' before "__restrict__"
regex.h:569: error: expected `,' or `...' before "__restrict__"
I'll attach the patch.
--
Summary: regex.h problem when compiling with g++
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=1201
------- 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] 5+ messages in thread
* [Bug regex/1201] regex.h problem when compiling with g++
2005-08-16 0:01 [Bug regex/1201] New: regex.h problem when compiling with g++ eggert at gnu dot org
@ 2005-08-16 0:01 ` eggert at gnu dot org
2005-09-06 16:46 ` drepper at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: eggert at gnu dot org @ 2005-08-16 0:01 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From eggert at gnu dot org 2005-08-16 00:01 -------
Created an attachment (id=589)
--> (http://sources.redhat.com/bugzilla/attachment.cgi?id=589&action=view)
patch for regex.h problem with g++
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=1201
------- 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] 5+ messages in thread
* [Bug regex/1201] regex.h problem when compiling with g++
2005-08-16 0:01 [Bug regex/1201] New: regex.h problem when compiling with g++ eggert at gnu dot org
2005-08-16 0:01 ` [Bug regex/1201] " eggert at gnu dot org
@ 2005-09-06 16:46 ` drepper at redhat dot com
2006-04-11 7:21 ` eggert at gnu dot org
2006-05-02 21:37 ` drepper at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: drepper at redhat dot com @ 2005-09-06 16:46 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From drepper at redhat dot com 2005-09-06 16:46 -------
The patch is wrong. g++ does support __restrict. There might be some versions
which didn't but this does not mean all version can be excluded.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://sourceware.org/bugzilla/show_bug.cgi?id=1201
------- 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] 5+ messages in thread
* [Bug regex/1201] regex.h problem when compiling with g++
2005-08-16 0:01 [Bug regex/1201] New: regex.h problem when compiling with g++ eggert at gnu dot org
2005-08-16 0:01 ` [Bug regex/1201] " eggert at gnu dot org
2005-09-06 16:46 ` drepper at redhat dot com
@ 2006-04-11 7:21 ` eggert at gnu dot org
2006-05-02 21:37 ` drepper at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: eggert at gnu dot org @ 2006-04-11 7:21 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From eggert at gnu dot org 2006-04-11 07:21 -------
I don't know which versions of g++ you're talking about, but the
abovementioned bug report from Bruno Haible says that no version of
g++ in the 3.2.*, 3.3.*, 3.4.*, 4.0.[01] series supports the
[__restrict] syntax, and I just now verified that g++ 4.1.0 does not
support it either; please see the shell transcript below.
Perhaps you confused __restrict with [__restrict]? This change talks
about the latter, not the former.
586-penguin $ g++ -c t.cc
t.cc:21: error: expected primary-expression before '__restrict__'
t.cc:21: error: expected `]' before '__restrict__'
t.cc:21: error: expected ',' or '...' before '__restrict__'
587-penguin $ gcc -c t.cc
t.cc:21: error: expected primary-expression before '__restrict__'
t.cc:21: error: expected `]' before '__restrict__'
t.cc:21: error: expected ',' or '...' before '__restrict__'
588-penguin $ cp t.cc t.c; gcc -c t.c
589-penguin $ gcc --version | sed 1q
gcc (GCC) 4.1.0
590-penguin $ g++ --version | sed 1q
g++ (GCC) 4.1.0
591-penguin $ cat t.cc
#ifndef __restrict
# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
# if defined restrict || 199901L <= __STDC_VERSION__
# define __restrict restrict
# else
# define __restrict
# endif
# endif
#endif
/* gcc 3.1 and up support the [restrict] syntax. */
#ifndef __restrict_arr
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define __restrict_arr __restrict
# else
# define __restrict_arr
# endif
#endif
extern int regexec (const int *__restrict __preg,
const char *__restrict __string, int __nmatch,
int __pmatch[__restrict_arr],
int __eflags);
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
http://sourceware.org/bugzilla/show_bug.cgi?id=1201
------- 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] 5+ messages in thread
* [Bug regex/1201] regex.h problem when compiling with g++
2005-08-16 0:01 [Bug regex/1201] New: regex.h problem when compiling with g++ eggert at gnu dot org
` (2 preceding siblings ...)
2006-04-11 7:21 ` eggert at gnu dot org
@ 2006-05-02 21:37 ` drepper at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: drepper at redhat dot com @ 2006-05-02 21:37 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From drepper at redhat dot com 2006-05-02 21:37 -------
I checked in an appropriate patch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=1201
------- 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] 5+ messages in thread
end of thread, other threads:[~2006-05-02 21:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-16 0:01 [Bug regex/1201] New: regex.h problem when compiling with g++ eggert at gnu dot org
2005-08-16 0:01 ` [Bug regex/1201] " eggert at gnu dot org
2005-09-06 16:46 ` drepper at redhat dot com
2006-04-11 7:21 ` eggert at gnu dot org
2006-05-02 21:37 ` 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).