public inbox for gnats-prs@sourceware.org
help / color / mirror / Atom feed
From: jdmorgen@rational.com
To: gnats-gnats@sourceware.cygnus.com
Subject: gnats/165: gcc 2.95.2 preprocessor bug with -O options
Date: Fri, 09 Mar 2001 17:34:00 -0000	[thread overview]
Message-ID: <20010310012957.8889.qmail@sourceware.cygnus.com> (raw)

>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=


                 reply	other threads:[~2001-03-09 17:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010310012957.8889.qmail@sourceware.cygnus.com \
    --to=jdmorgen@rational.com \
    --cc=gnats-gnats@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).