[llvm-bugs] [Bug 31946] New: clang++ and g++ disagree on invalid definition of std::initializer_list

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 13 07:05:27 PST 2017


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

            Bug ID: 31946
           Summary: clang++ and g++ disagree on invalid definition of
                    std::initializer_list
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: davide at freebsd.org
                CC: dgregor at apple.com, filcab at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Created attachment 17972
  --> https://bugs.llvm.org/attachment.cgi?id=17972&action=edit
testcase

If I compile the testcase attached with clang, it builds fine.
gcc, instead, complains about an invalid initializer list.

$ clang++ -O2 /home/davide/work/game8/delta-reduced.c -std=gnu++11 -fpermissive
-frtti -fexceptions -fno-strict-aliasing -fms-extensions -w -g -std=gnu++11 -c

$ g++ -O2 /home/davide/work/game8/delta-reduced.c -std=gnu++11 -fpermissive
-frtti -fexceptions -fno-strict-aliasing -fms-extensions -w -g -std=gnu++11 -c

/home/davide/work/game8/delta-reduced.c:1093:9: error: template parameters not
deducible in partial specialization:
  struct _Extent<_Ty[], _Nx>
         ^~~~~~~~~~~~~~~~~~~
/home/davide/work/game8/delta-reduced.c:1093:9: note:         '_Ix'
/home/davide/work/game8/delta-reduced.c:1656:8: fatal error: definition of
std::initializer_list does not match #include <initializer_list>
  class initializer_list
        ^~~~~~~~~~~~~~~~

Sorry for the large'ish testcase, but this is reduced from a much larger
testcase, and delta/creduce couldn't do better than this.

-- 
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/20170213/5138b4db/attachment.html>


More information about the llvm-bugs mailing list