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++/50012] [4.5/4.6/4.7 Regression] C++ front end misses -Wsign-compare warnings when extraneous parentheses are present


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

--- Comment #7 from Ian Lance Taylor <ian at airs dot com> 2012-01-07 01:31:36 UTC ---
Created attachment 26260
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26260
Possible patch

I did not like the first approach because I think that checking c_dialect_cxx
in the generic C family code is quite ugly.  But clearly the current approach
is problematic, and it's actually easy to implement Richi's suggestion.  This
patch is a possible approach, but it doesn't work as is.  It issues a warning
for

  if (TYPE_QUALS (type) == memfn_quals)

in cp;typeck.c.  Here memfn_quals is signed int but TYPE_QUALS, an expression
of enum values winds up unsigned.


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