[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cannot compile C++ skeleton with g++-4.3 -Wall -Werror

From: Akim Demaille
Subject: Re: cannot compile C++ skeleton with g++-4.3 -Wall -Werror
Date: Thu, 26 Mar 2009 15:05:48 +0100

Le 26 mars 09 à 11:44, Alexandre Duret-Lutz a écrit :


Debian recently upgraded our copy of Bison from 2.3 to 2.4.1, and we found
that our project no longer compiles with g++-4.3.

This code from position.hh

 /// Compare two position objects.
 inline bool
 operator== (const position& pos1, const position& pos2)
     (pos1.filename == pos2.filename
|| pos1.filename && pos2.filename && *pos1.filename == *pos2.filename)
     && pos1.line == pos2.line && pos1.column == pos2.column;

generates the following error with g++-4.3 -Wall -Werror:

position.hh: In function 'bool yy::operator==(const yy::position&, const yy::position&)':
position.hh:136: error: suggest parentheses around && within ||

Thanks, we will fix that.  There will probably be a 2.4.2.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]