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/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended


------- Additional Comments From trt at acm dot org  2004-12-08 18:48 -------
I should mention there is a hack for the problem noted in comment #5: do the
temporary truthvalue conversions with warnings suppressed.
That is, change the two instances of

   tree t = lang_hooks.truthvalue_conversion (default_conversion ($1.value));

to instead be

   tree t;
   inhibit_warnings++;
   t = lang_hooks.truthvalue_conversion (default_conversion ($1.value));
   inhibit_warnings--;

So, this can be "readily made to work" after all.  But ugh.

-- 


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


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