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

            Bug ID: 28473
           Summary: GCC Compatibility: __final specifier unsupported
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

C++11 added support for "final" as a specifier.  Prior to that, G++ supported
"__final", which has the same affect, but was allowed without warning in
pre-C++11.  ICC Mirrors GCC's behavior.

Clang currently ALLOWS "final" in pre-C++11 (with a warning), so I believe that
for the sake of compatibility, Clang should ALSO support "__final".  

A simple test case:
class Foo __final {int a; };

I have a patch that I'm preparing to make these two aliases of each other if
there is interest in fixing this bug.  If so, I question whether we should keep
it having the same behavior as "final" (warn always), or if we should suppress
the warning to reproduce GCC's behavior.  My current patch (currently testing
myself) does the former, but I believe with some additional work I could do the
latter.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to