This is the mail archive of the gcc-bugs@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]

[Bug c/18624] GCC does not detect local variable set but never used



------- Comment #8 from alexander_herrmann at yahoo dot com dot au  2005-11-02 11:29 -------
I guessed somebody found it before but searching the db I couldn'n find it.
Anyway shouldn't we make it than dependend or blocking Bug
#tree-optimization/21513
As the funktion while C correct will never make it to the compiler using the
-Werror switch together with optimization when this Bug is fixed :)
int problem_funktion(int a)
{
   int b;
   if (__builtin_expect(((a > 0) && ((b = 5) != 0)),
1))
   {
      return(a*b);
   }
   return(a);
} 


-- 

alexander_herrmann at yahoo dot com dot au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |21513
              nThis|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624


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