[llvm-bugs] [Bug 47316] 'error: parameter declarator cannot be qualified' on seemingly valid code

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 26 18:13:16 PDT 2020


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

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

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

--- Comment #2 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Yes, weird though this might be, the standard rules say that this disambiguates
as a function declaration whose parameter is named a::d (with redundant
parentheses around the parameter name), just like:

a::e f(a::e a::d);

... which is invalid because the name of the parameter can't be qualified, but
that's a semantic restriction that's not taken into account by disambiguation.

MSVC and EDG agree that this testcase is invalid for the same reason Clang
diagnoses it, so it looks like it's only GCC that uses the presence of the
qualifier for disambiguation.

-- 
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/20200827/909fdc9c/attachment.html>


More information about the llvm-bugs mailing list