public inbox for gnats-prs@sourceware.org
help / color / mirror / Atom feed
* gnats/165: gcc 2.95.2 preprocessor bug with -O options
@ 2001-03-09 17:34 jdmorgen
0 siblings, 0 replies; only message in thread
From: jdmorgen @ 2001-03-09 17:34 UTC (permalink / raw)
To: gnats-gnats
>Number: 165
>Category: gnats
>Synopsis: gcc 2.95.2 preprocessor bug with -O options
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 09 17:34:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: J. David Morgenthaler
>Release: gcc-2.95.2
>Organization:
>Environment:
Linux 2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT 1999 i686 unknown
>Description:
preprocessor error for gcc using -O, -O2... Does not occur
with g++ or without -O
Sample section of bad.i file:
# 1 "bad.c" 2
void bad()
{
if(( __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( "mystr" ) && __builtin_constant_p (
#if defined(SOMETHING)
"yourstr" ) && (__s1_len = strlen ( "mystr" ), __s2_len = strlen ( #if defined(SOMETHING) "yourstr" ), (! ((size_t)(const void *)(( "mystr" ) + 1) - (size_t)(const void *)( "mystr" ) == 1) || __s1_len >= 4) && (! ((size_t)(const void *)(( #if defined(SOMETHING) "yourstr" ) + 1) - (size_t)(const void *)( #if defined(SOMETHING) "yourstr" ) == 1) || __s2_len >= 4)) ? memcmp ((__const char *) ( "mystr" ), (__const char *) ( #if defined(SOMETHING) "yourstr" ), (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) : (__builtin_constant_p (
>How-To-Repeat:
gcc -O
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bad.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bad.c"
I2luY2x1ZGUgPHN0cmluZy5oPgoKdm9pZCBiYWQoKQp7CiAgaWYoKCBzdHJjbXAoICJteXN0ciIs
ICAgICAgICAgICAgICAgIAojaWYgZGVmaW5lZChTT01FVEhJTkcpCgkgICAgICAgInlvdXJzdHIi
KSAKI2Vsc2UgCiAgICAgICAgICAgICAgICIiKSAKI2VuZGlmICAKCSE9IDAgKSApIAogICAgIDsK
fQo=
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-09 17:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-09 17:34 gnats/165: gcc 2.95.2 preprocessor bug with -O options jdmorgen
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).