[LLVMbugs] [Bug 9095] New: Most vexing parse only reported on local variables

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 28 12:09:16 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=9095

           Summary: Most vexing parse only reported on local variables
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


In
-------------------
struct foo {
};

struct bar {
  bar(foo x);
};

bar y(foo());

int main(void) {
  bar x(foo());
  return 0;
}
-----------------

clang reports:
--------------------
test.cc:11:8: warning: parentheses were disambiguated as a function declarator
  bar x(foo());
       ^~~~~~~
--------------------

but no warning is printed for y.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list