[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cannot compile C++ skeleton with g++-4.3 -Wall -Werror
From: |
Alexandre Duret-Lutz |
Subject: |
cannot compile C++ skeleton with g++-4.3 -Wall -Werror |
Date: |
Thu, 26 Mar 2009 11:44:17 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Hi,
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)
{
return
(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 ||
Regards,
--
Alexandre Duret-Lutz
- cannot compile C++ skeleton with g++-4.3 -Wall -Werror,
Alexandre Duret-Lutz <=