[Bug c++/12522] New: Correct code with operator, fails to compile
atlaste at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Mon Oct 6 11:58:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12522
Summary: Correct code with operator, fails to compile
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: atlaste at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
The following snippet fails to compile with the g++ compiler (tested versions
2.95.4, 3.0.4, 3.2.3, 3.3.2):
---
struct bla {
bla &operator,(int) { return *this; }
};
int main() {
(bla(),5);
return 0;
}
---
However, if we replace the "(bla(),5)" with "bla(),5", the code compiles
correctly.
More information about the Gcc-bugs
mailing list