[llvm-bugs] [Bug 28473] New: GCC Compatibility: __final specifier unsupported

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 8 13:09:37 PDT 2016


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: unassignedclangbugs at nondot.org
          Reporter: erich.keane at intel.com
                CC: llvm-bugs at lists.llvm.org
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160708/4eba3e76/attachment.html>


More information about the llvm-bugs mailing list