This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/30725] New: compile error when meet with ((A()()))


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]