This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pending/5051: May I ask a C Language problem?


The following reply was made to PR pending/5051; it has been noted by GNATS.

From: rodrigc@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  nobody@gcc.gnu.org, s9322036@ncnu.edu.tw
Cc:  
Subject: Re: pending/5051: May I ask a C Language problem?
Date: 9 Dec 2001 03:04:07 -0000

 Synopsis: May I ask a C Language problem?
 
 State-Changed-From-To: open->closed
 State-Changed-By: rodrigc
 State-Changed-When: Sat Dec  8 19:04:06 2001
 State-Changed-Why:
     Not a bug.
     If I compile your code with:
     gcc -Wall -pedantic test.c
     
     r.c:8: warning: operation on `x' may be undefined
     
     If I compile with the Digital Unix C++ compiler,
     I get a larger warning:
     
     cc: Warning: test.c, line 8: In this statement, the expression "printf(...)" modifies the variable "x" more than once without an intervening sequence point.  This behavior is undefined. (undefvarmod)
       printf ("%d\n", a (x));
     
     What you are doing is undefined, so can differ between
     compilers.
     
     This is not a bug in gcc.  Post your general C language questions
     to the newsgroup comp.lang.c.moderated
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=5051&database=gcc


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]