[llvm-bugs] [Bug 37593] clang: diagnostics about constexpr misuse are nonexistant

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 25 14:10:05 PDT 2018


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

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
GCC bug. The code is valid.

Apparently GCC is confused by the 'auto', and rejects the mismatch of types
'const A::B' vs 'const auto', rather than checking the types match after
deduction.

MSVC appears to have the same bug as GCC.

ICC also appears to have the same bug. It also has a bug where it doesn't allow
'constexpr' to be added in the definition.


Simpler testcase:

extern int a;
auto a = 0;

This is incorrectly rejected by MSVC and GCC. But ICC accepts this one. *shrug*

-- 
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/20180525/88db0135/attachment-0001.html>


More information about the llvm-bugs mailing list