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

            Bug ID: 24272
           Summary: Inconsistency with respect to using declaration
                    ordering
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Why does clang accept this?

  namespace M { struct i {}; }
  namespace N { static int i = 1; }
  using N::i;
  using M::i;
  int main() { sizeof (i); }

but not this?

  namespace M { struct i {}; }
  namespace N { static int i = 1; }
  using M::i;
  using N::i;
  int main() { sizeof (i); }

This seems inconsistent. For comparison GCC accepts both of these programs.

I tired it with the following command line:

  clang++ prog.cc -std=c++14 -pedantic-errors

-- 
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