https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96540

            Bug ID: 96540
           Summary: gcc fails to build on Darwin 19.6.0
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: juergen.reuter at desy dot de
  Target Milestone: ---

I am using the following setup:
Darwin 19.6.0, macOS Catalina 10.15.6, XCode v11.6, with clang
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

g++ -std=c++11  -fno-PIE -c  -DIN_GCC_FRONTEND -g  -DIN_GCC   
-fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag
-Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-I. -Ic -I../../gcc -I../../gcc/c -I../../gcc/../include -I./../intl
-I../../gcc/../libcpp/include -I/usr/local//include -I/usr/local//include 
-I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc/../libbacktrace -I/usr/local//include  -o c/gimple-parser.o -MT
c/gimple-parser.o -MMD -MP -MF c/.deps/gimple-parser.TPo
../../gcc/c/gimple-parser.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is
deprecated [-Wdeprecated]
warning: unknown warning option '-Werror=format-diag'
[-Wunknown-warning-option]
In file included from ../../gcc/c/gimple-parser.c:22:
In file included from ../../gcc/coretypes.h:476:
In file included from ../../gcc/hash-table.h:248:
../../gcc/vec.h:543:13: warning: 'constexpr' non-static member function will
not be implicitly 'const' in C++14; add
      'const' to avoid a change in behavior [-Wconstexpr-not-const]
  CONSTEXPR operator vec<T, A, L> () { return vec<T, A, L>(); }
            ^
                                     const
In file included from ../../gcc/c/gimple-parser.c:28:
../../gcc/cgraph.h:1741:1: warning: 'cgraph_edge' defined as a class here but
previously declared as a struct; this is
      valid, but may result in linker errors under the Microsoft C++ ABI
[-Wmismatched-tags]
class GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"),
^
../../gcc/cgraph.h:903:1: note: did you mean class here?
struct cgraph_edge;
^~~~~~
class
../../gcc/coretypes.h:144:1: note: did you mean class here?
struct cgraph_edge;
^~~~~~
class
In file included from ../../gcc/c/gimple-parser.c:28:
../../gcc/cgraph.h:2254:10: warning: struct 'cgraph_edge' was previously
declared as a class; this is valid, but may
      result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
  friend struct cgraph_edge;
         ^
../../gcc/cgraph.h:1742:16: note: previous use is here
           for_user)) cgraph_edge
                      ^
../../gcc/cgraph.h:2254:10: note: did you mean class here?
  friend struct cgraph_edge;
         ^~~~~~
         class
../../gcc/cgraph.h:2662:32: warning: struct 'cgraph_edge' was previously
declared as a class; this is valid, but may
      result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
void initialize_inline_failed (struct cgraph_edge *);
                               ^
../../gcc/cgraph.h:1742:16: note: previous use is here
           for_user)) cgraph_edge
                      ^
../../gcc/cgraph.h:2662:32: note: did you mean class here?
void initialize_inline_failed (struct cgraph_edge *);
                               ^~~~~~
                               class
../../gcc/cgraph.h:2663:28: warning: struct 'cgraph_edge' was previously
declared as a class; this is valid, but may
      result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
bool speculation_useful_p (struct cgraph_edge *e, bool anticipate_inlining);
                           ^
../../gcc/cgraph.h:1742:16: note: previous use is here
           for_user)) cgraph_edge
                      ^
../../gcc/cgraph.h:2663:28: note: did you mean class here?
bool speculation_useful_p (struct cgraph_edge *e, bool anticipate_inlining);
                           ^~~~~~
                           class
In file included from ../../gcc/c/gimple-parser.c:44:
In file included from ../../gcc/tree-vrp.h:23:
../../gcc/value-range.h:347:1: error: static declaration of 'gt_ggc_mx' follows
non-static declaration
gt_ggc_mx (int_range<N> *x)
^
../../gcc/value-range.h:150:37: note: previous declaration is here
  template <unsigned X> friend void gt_ggc_mx (int_range<X> *);
                                    ^
../../gcc/value-range.h:358:1: error: static declaration of 'gt_pch_nx' follows
non-static declaration
gt_pch_nx (int_range<N> *x)
^
../../gcc/value-range.h:151:37: note: previous declaration is here
  template <unsigned X> friend void gt_pch_nx (int_range<X> *);
                                    ^
../../gcc/value-range.h:369:1: error: static declaration of 'gt_pch_nx' follows
non-static declaration
gt_pch_nx (int_range<N> *x, gt_pointer_operator op, void *cookie)
^
../../gcc/value-range.h:152:37: note: previous declaration is here
  template <unsigned X> friend void gt_pch_nx (int_range<X> *,
                                    ^
In file included from ../../gcc/c/gimple-parser.c:49:
../../gcc/gimple.h:2599:10: warning: array index 1 is past the end of the array
(which contains 1 element)
      [-Warray-bounds]
  return gs->op[1];
         ^      ~
../../gcc/gimple.h:337:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:2631:3: warning: array index 1 is past the end of the array
(which contains 1 element) [-Warray-bounds]
  gs->op[1] = rhs;
  ^      ~
../../gcc/gimple.h:337:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:2649:12: warning: array index 2 is past the end of the array
(which contains 1 element)
      [-Warray-bounds]
    return gs->op[2];
           ^      ~
../../gcc/gimple.h:337:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:2669:11: warning: array index 2 is past the end of the array
(which contains 1 element)
      [-Warray-bounds]
  return &gs->op[2];
          ^      ~
../../gcc/gimple.h:337:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:2686:3: warning: array index 2 is past the end of the array
(which contains 1 element) [-Warray-bounds]
  gs->op[2] = rhs;
  ^      ~
../../gcc/gimple.h:337:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:2703:12: warning: array index 3 is past the end of the array
(which contains 1 element)
      [-Warray-bounds]
    return gs->op[3];
           ^      ~
../../gcc/gimple.h:337:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:2723:11: warning: array index 3 is past the end of the array
(which contains 1 element)
      [-Warray-bounds]
  return &ass->op[3];
          ^       ~
../../gcc/gimple.h:337:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:2733:3: warning: array index 3 is past the end of the array
(which contains 1 element) [-Warray-bounds]
  gs->op[3] = rhs;
  ^      ~
../../gcc/gimple.h:337:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:3095:10: warning: array index 1 is past the end of the array
(which contains 1 element)
      [-Warray-bounds]
  return gs->op[1];
         ^      ~
../../gcc/gimple.h:362:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:3128:3: warning: array index 1 is past the end of the array
(which contains 1 element) [-Warray-bounds]
  gs->op[1] = fn;
  ^      ~
../../gcc/gimple.h:362:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:3138:3: warning: array index 1 is past the end of the array
(which contains 1 element) [-Warray-bounds]
  gs->op[1] = build1_loc (gimple_location (gs), ADDR_EXPR,
  ^      ~
../../gcc/gimple.h:362:3: note: array 'op' declared here
  tree GTY((length ("%h.num_ops"))) op[1];
  ^
../../gcc/gimple.h:3199:10: warning: array index 2 is past the end of the array
(which contains 1 element)
      [-Warray-bounds]
  return gs->op[2];

Reply via email to