[Bug c++/30725] New: compile error when meet with ((A()()))
lidaobing at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Feb 7 03:44:00 GMT 2007
following example file can't compiled
$ cat bug.cpp
class A{
public:
bool operator()() const {
return true;
}
};
int main() {
if ((A()())) {}
}
$ g++-4.1 -c bug.cpp
bug.cpp: In function Âint main()Â:
bug.cpp:9: error: Âtype name declared as function returning a function
bug.cpp:9: error: Âtype name declared as function returning a function
$ g++-4.1 --version
g++-4.1 (GCC) 4.1.2 20061212 (prerelease) (Ubuntu 4.1.1-21ubuntu3)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Summary: compile error when meet with ((A()()))
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lidaobing at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30725
More information about the Gcc-bugs
mailing list