NO_IMPLICIT_EXTERN_C is not set - leads to C++ compilation errors

Bug #1789395 reported by Andreas Pokorny
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-arm-none-eabi (Ubuntu)
New
Undecided
Unassigned

Bug Description

Steps to reproduce:
$ mkdir foo
$ echo "template<typename C> struct Blubber {};" > foo/foo.h
$ echo "#include \"foo.h\"" > foo.cpp
$ arm-none-eabi-g++ -isystem /home/andreas/foo/ foo.cpp -o FOO
In file included from foo.cpp:1:0:
/home/andreas/foo/foo.h:1:1: error: template with C linkage
 template<typename C> struct Blubber {};
 ^~~~~~~~

$ lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04

$ apt-cache policy gcc-arm-none-eabi
gcc-arm-none-eabi:
  Installed: 15:6.3.1+svn253039-1build1
  Candidate: 15:6.3.1+svn253039-1build1
  Version table:
 *** 15:6.3.1+svn253039-1build1 500
        500 http://de.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

The compiler package is usually used in conjunction with newlib and libstdc++-arm-none-eabi-newlib so the C library being used is c++ aware.

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

Note that this shortcoming also troubles a lot of people that use the alternative none-eabi compiler available from arm directly: https://bugs.launchpad.net/gcc-arm-embedded/+bug/1698539 but they show exceptional do-not-care attitude.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.