This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30725] New: compile error when meet with ((A()()))
- From: "lidaobing at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Feb 2007 03:44:20 -0000
- Subject: [Bug c++/30725] New: compile error when meet with ((A()()))
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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