This is the mail archive of the gcc-patches@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: [PATCH] PR 17946: warning message for suspect "a && MASK"


> I think this may lead to duplicate diagnostics from truthvalue_conversion 
> if the expression being used as a truth value isn't valid as such.

Sure enough, this gives a duplicate warning:
                                                                                                                     
        int main()
        {
          return main && main;
        }
                                                                                                                     
What I did for years was just comment-out the conversion.
But I figured that wouldn't be acceptable either :-)  Sigh.


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