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: PR c++/36921 [4.3/4.4 Regression] warning "comparison does not have mathematical meaning" is not correct for overloaded operators that do not return boolean


On Sat, Dec 20, 2008 at 12:47:20AM +0100, Jakub Jelinek wrote:
> On Fri, Dec 19, 2008 at 06:29:48PM -0500, Jason Merrill wrote:
> > Since, as you point out, we aren't actually missing any wanted warnings,  
> > I don't mind putting this logic in warn_about_parentheses.  But the test  
> > should still check the types of the arguments rather than the whole  
> > expression.
> 
> You're right, that works too.  I've so far just checked this testcase,
> will do full bootstrap/regtest soon.

While it works for C++, it doesn't for C, where the type of the comparison
argument is INTEGER_TYPE.  I guess using INTEGRAL_TYPE_P instead should work
though.

	Jakub


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