https://bugs.llvm.org/show_bug.cgi?id=46713

            Bug ID: 46713
           Summary: Clang accepts default arguments in a try-catch block
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: haoxi...@gmail.com
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk

Hi, all.

This code, test.cc, is an invalid code I guess, but Clang accepts it.

$cat test.cc
int main(){
    try { }
    catch ( auto ( int = 0, int) -> int ){}
    return 0;
}

While output in GCC:
error: default arguments are only permitted for function parameters
[-fpermissive]

Output in ICC:
error #1077: specifying a default argument on this declaration is nonstandard

All Clang versions from 6.0 behave the same.

So is this a accept-invalid bug in Clang?  Or Clang just does this for
intentionally?

Thanks,
Haoxin

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to