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

            Bug ID: 103487
           Summary: "paranoia" Makefile target in gcc/Makefile fails to
                    build
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: egallager at gcc dot gnu.org
                CC: rth at gcc dot gnu.org
  Target Milestone: ---

Looks like contrib/paranoia.cc hasn't been updated in a while:

g++ -c   -g  -DIN_GCC -fPIC   -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common 
-DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include
-I../../gcc/../libcpp/include -I../../gcc/../libcody -I/opt/local/include
-I/opt/local/include -I/opt/local/include  -I../../gcc/../libdecnumber
-I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace 
-I/opt/local/include ../../gcc/../contrib/paranoia.cc -o paranoia.o
In file included from ../../gcc/../contrib/paranoia.cc:154:
../../gcc/hwint.h:291:7: error: use of undeclared identifier
'gcc_checking_assert'
      gcc_checking_assert (prec < HOST_BITS_PER_WIDE_INT);
      ^
../../gcc/hwint.h:314:7: error: use of undeclared identifier
'gcc_checking_assert'
      gcc_checking_assert (prec < HOST_BITS_PER_WIDE_INT);
      ^
../../gcc/hwint.h:324:3: error: use of undeclared identifier
'gcc_checking_assert'
  gcc_checking_assert (x != HOST_WIDE_INT_MIN);
  ^
../../gcc/hwint.h:361:1: error: conflicting types for 'mul_hwi'
mul_hwi (HOST_WIDE_INT a, HOST_WIDE_INT b, bool *overflow)
^
../../gcc/hwint.h:264:22: note: previous declaration is here
extern HOST_WIDE_INT mul_hwi (HOST_WIDE_INT, HOST_WIDE_INT);
                     ^
../../gcc/../contrib/paranoia.cc:172:9: warning: keyword is hidden by macro
definition [-Wkeyword-macro]
#define class klass
        ^
In file included from ../../gcc/../contrib/paranoia.cc:174:
../../gcc/real.h:181:24: error: use of undeclared identifier 'NUM_MODE_FLOAT'
  real_format_for_mode[NUM_MODE_FLOAT + NUM_MODE_DECIMAL_FLOAT];
                       ^
../../gcc/real.h:181:41: error: use of undeclared identifier
'NUM_MODE_DECIMAL_FLOAT'
  real_format_for_mode[NUM_MODE_FLOAT + NUM_MODE_DECIMAL_FLOAT];
                                        ^
../../gcc/real.h:216:1: error: unknown type name 'klass'; did you mean 'class'?
class format_helper
^~~~~
class
../../gcc/../contrib/paranoia.cc:172:15: note: expanded from macro 'class'
#define class klass
              ^
In file included from ../../gcc/../contrib/paranoia.cc:174:
../../gcc/real.h:220:3: error: templates must have C++ linkage
  template<typename T> format_helper (const T &);
  ^~~~~~~~~~~~~~~~~~~~
../../gcc/../contrib/paranoia.cc:135:3: note: extern "C" language linkage
specification begins here
  extern "C" {
  ^
In file included from ../../gcc/../contrib/paranoia.cc:174:
../../gcc/real.h:231:1: error: templates must have C++ linkage
template<typename T>
^~~~~~~~~~~~~~~~~~~~
../../gcc/../contrib/paranoia.cc:135:3: note: extern "C" language linkage
specification begins here
  extern "C" {
  ^
In file included from ../../gcc/../contrib/paranoia.cc:174:
../../gcc/real.h:233:35: error: use of undeclared identifier 'gcc_unreachable'
  : m_format (m == VOIDmode ? 0 : REAL_MODE_FORMAT (m))
                                  ^
../../gcc/real.h:189:7: note: expanded from macro 'REAL_MODE_FORMAT'
                        : (gcc_unreachable (), 0)])
                           ^
../../gcc/real.h:233:35: error: use of undeclared identifier
'MIN_MODE_DECIMAL_FLOAT'
../../gcc/real.h:185:17: note: expanded from macro 'REAL_MODE_FORMAT'
                        ? (((MODE) - MIN_MODE_DECIMAL_FLOAT)            \
                                     ^
../../gcc/real.h:233:35: error: use of undeclared identifier 'NUM_MODE_FLOAT'
../../gcc/real.h:186:9: note: expanded from macro 'REAL_MODE_FORMAT'
                           + NUM_MODE_FLOAT)                            \
                             ^
../../gcc/real.h:233:35: error: use of undeclared identifier 'MODE_FLOAT'
../../gcc/real.h:187:31: note: expanded from macro 'REAL_MODE_FORMAT'
                        : GET_MODE_CLASS (MODE) == MODE_FLOAT           \
                                                   ^
../../gcc/real.h:233:35: error: use of undeclared identifier 'MIN_MODE_FLOAT'
../../gcc/real.h:188:16: note: expanded from macro 'REAL_MODE_FORMAT'
                        ? ((MODE) - MIN_MODE_FLOAT)                     \
                                    ^
../../gcc/real.h:233:20: error: use of undeclared identifier 'VOIDmode'
  : m_format (m == VOIDmode ? 0 : REAL_MODE_FORMAT (m))
                   ^
../../gcc/real.h:243:25: error: unknown type name 'machine_mode'
extern bool HONOR_NANS (machine_mode);
                        ^
../../gcc/real.h:244:25: error: unknown type name 'const_tree'
extern bool HONOR_NANS (const_tree);
                        ^
../../gcc/real.h:245:25: error: unknown type name 'const_rtx'
extern bool HONOR_NANS (const_rtx);
                        ^
../../gcc/real.h:248:26: error: unknown type name 'machine_mode'
extern bool HONOR_SNANS (machine_mode);
                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [paranoia.o] Error 1

(this is clang++ masquerading as g++ here)

git blame says the file was mostly written by Richard T. Henderson; cc-ing him.

Reply via email to