[llvm-bugs] [Bug 38144] Incorrectly accepts double declarations

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 12 11:10:39 PDT 2018


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

           What    |Removed                     |Added
                 CC|                            |richard-llvm at metafoo.co.uk
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
[namespace.udecl]p10: "A using-declaration is a declaration and can therefore
be used repeatedly where (and only where) multiple declarations are allowed"

Block scope is a place where multiple declarations are allowed. GCC allows
this, for example:

void f() {
  extern int i;
  extern int i;

So I would argue that this is a GCC bug. However, see core issue 36
(http://wg21.link/cwg36) -- CWG does not have a consensus position on the
desired validity of this example.

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/20180712/b07d0df6/attachment.html>

More information about the llvm-bugs mailing list