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

Richard Smith <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <[email protected]> ---
This code is ill-formed, but a compiler is not required to issue a diagnostic
for it, so both compilers are correct.

For a redeclaration of a function template, the rule is that dependent portions
of the type must be 'equivalent' (that is, composed of the same sequence of
tokens interpreted the same way). In your case, the return type of the function
definition is 'functionally equivalent' to the return type of the declaration
(that is, it will always resolve to the same type) but is not equivalent, and
that makes your code ill-formed.

So, the -DPACIFY_CLANG code is correct. The -DPACIFY_CLANG_ANGER_GCC code is
ill-formed, for the same reason the original code is ill-formed, but in that
case, it's Clang which doesn't issue a diagnostic (as before, a compiler is not
required to diagnose this).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to