public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/97758] New: bits/std_function.h: error: unknown type name 'type_info' when using -fno-exceptions -fno-rtti
@ 2020-11-08 22:51 romain.geissler at amadeus dot com
  2020-11-09  8:17 ` [Bug libstdc++/97758] [11 Regression] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: romain.geissler at amadeus dot com @ 2020-11-08 22:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97758
           Summary: bits/std_function.h: error: unknown type name
                    'type_info' when using -fno-exceptions -fno-rtti
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: romain.geissler at amadeus dot com
  Target Milestone: ---

Hi,

I am using the trunk from today (8th november, git revision
b642fca1c31b2e2175e0860daf32b4ee0d918085).

When trying to build clang with it I end up with this error (on Linux x86_64):

FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ParallelCG.cpp.o 
/workdir/build/final-system/llvm-build/./bin/clang++  -DGTEST_HAS_RTTI=0
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -Ilib/CodeGen -I/workdir/src/llvm-12.0.0/llvm/lib/CodeGen
-Iinclude -I/workdir/src/llvm-12.0.0/llvm/include -isystem
/workdir/build/final-system/llvm-temporary-static-dependencies/install/include
-O2
-I/workdir/build/final-system/llvm-temporary-static-dependencies/install/include
-I/workdir/build/final-system/llvm-temporary-static-dependencies/install/include/ncursesw
-fPIC -fvisibility-inlines-hidden -Werror=date-time
-Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic
-Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default
-Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor
-Wsuggest-override -Wstring-conversion -fdiagnostics-color -ffunction-sections
-fdata-sections
-fprofile-instr-generate="/workdir/build/final-system/llvm-build/tools/clang/stage2-instrumented-bins/profiles/%4m.profraw"
-flto -O3 -DNDEBUG    -fno-exceptions -fno-rtti -std=c++14 -MD -MT
lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ParallelCG.cpp.o -MF
lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ParallelCG.cpp.o.d -o
lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ParallelCG.cpp.o -c
/workdir/src/llvm-12.0.0/llvm/lib/CodeGen/ParallelCG.cpp
In file included from
/workdir/src/llvm-12.0.0/llvm/lib/CodeGen/ParallelCG.cpp:13:
In file included from
/workdir/src/llvm-12.0.0/llvm/include/llvm/CodeGen/ParallelCG.h:17:
In file included from
/opt/1A/toolchain/x86_64-v21.0.10/lib64/gcc/x86_64-1a-linux-gnu/11.0.0/../../../../include/c++/11.0.0/functional:59:
/opt/1A/toolchain/x86_64-v21.0.10/lib64/gcc/x86_64-1a-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:190:31:
error: unknown type name 'type_info'
              __dest._M_access<const type_info*>() = nullptr;
                                     ^
1 error generated.

Note that apparently these llvm files are compiled with -fno-exceptions
-fno-rtti, so it seems triggered by the recent changes around std::function
without rtti support.

Cheers,
Romain

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/97758] [11 Regression] bits/std_function.h: error: unknown type name 'type_info' when using -fno-exceptions -fno-rtti
  2020-11-08 22:51 [Bug libstdc++/97758] New: bits/std_function.h: error: unknown type name 'type_info' when using -fno-exceptions -fno-rtti romain.geissler at amadeus dot com
@ 2020-11-09  8:17 ` redi at gcc dot gnu.org
  2020-11-09 14:29 ` cvs-commit at gcc dot gnu.org
  2020-11-09 14:46 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-09  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.2.1
   Target Milestone|---                         |11.0
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
           Keywords|                            |rejects-valid
      Known to fail|                            |11.0
     Ever confirmed|0                           |1
            Summary|bits/std_function.h: error: |[11 Regression]
                   |unknown type name           |bits/std_function.h: error:
                   |'type_info' when using      |unknown type name
                   |-fno-exceptions -fno-rtti   |'type_info' when using
                   |                            |-fno-exceptions -fno-rtti
   Last reconfirmed|                            |2020-11-09

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/97758] [11 Regression] bits/std_function.h: error: unknown type name 'type_info' when using -fno-exceptions -fno-rtti
  2020-11-08 22:51 [Bug libstdc++/97758] New: bits/std_function.h: error: unknown type name 'type_info' when using -fno-exceptions -fno-rtti romain.geissler at amadeus dot com
  2020-11-09  8:17 ` [Bug libstdc++/97758] [11 Regression] " redi at gcc dot gnu.org
@ 2020-11-09 14:29 ` cvs-commit at gcc dot gnu.org
  2020-11-09 14:46 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-09 14:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:99bf3a817b9d31905dd12448e853ad2685635250

commit r11-4838-g99bf3a817b9d31905dd12448e853ad2685635250
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Nov 9 10:09:51 2020 +0000

    libstdc++: Include <typeinfo> even for -fno-rtti [PR 97758]

    The std::function code now uses std::type_info* even when RTTI is
    disabled, so it should include <typeinfo> unconditionally. Without this,
    Clang can't compile <functional> with -fno-rtti (it works with GCC
    because std::type_info gets declared automatically by the compiler).

    libstdc++-v3/ChangeLog:

            PR libstdc++/97758
            * include/bits/std_function.h [!__cpp_rtti]: Include <typeinfo>.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/97758] [11 Regression] bits/std_function.h: error: unknown type name 'type_info' when using -fno-exceptions -fno-rtti
  2020-11-08 22:51 [Bug libstdc++/97758] New: bits/std_function.h: error: unknown type name 'type_info' when using -fno-exceptions -fno-rtti romain.geissler at amadeus dot com
  2020-11-09  8:17 ` [Bug libstdc++/97758] [11 Regression] " redi at gcc dot gnu.org
  2020-11-09 14:29 ` cvs-commit at gcc dot gnu.org
@ 2020-11-09 14:46 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-09 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Should be fixed now, thanks for the report.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-09 14:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 22:51 [Bug libstdc++/97758] New: bits/std_function.h: error: unknown type name 'type_info' when using -fno-exceptions -fno-rtti romain.geissler at amadeus dot com
2020-11-09  8:17 ` [Bug libstdc++/97758] [11 Regression] " redi at gcc dot gnu.org
2020-11-09 14:29 ` cvs-commit at gcc dot gnu.org
2020-11-09 14:46 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).