Hi,

given the following code:

-- isystem_test.cpp -------------
#include < isystem_test.h>

bool dummy_function( void )
{
        return false;
}
-----------------------------------------

-- isystem_test.h ------------------
template <class _CS_cT>
class allocator
{
};
-----------------------------------------

and g++ version: arm-eabi-g++.exe (Linaro GCC 7.2-2017.11)

1. compiling with "arm-eabi-g++ -I . -g -c isystem_test.cpp"
--> OK

2. compiling with " arm-eabi-g++ -isystem . -g -c isystem_test.cpp "
--> output error:
In file included from isystem_test.cpp:3:0:
./isystem_test.h:3:1: error: template with C linkage
 template <class _CS_cT>
 ^~~~~~~~

It seams that the option -isystem changes the include of isystems_test.h into a 
C include, i.e. the header content seems to be handled as C-Code

Same error behavior with arm-eabi Linaro GCC 6.4-2017.11,  Linaro GCC 
6.3-2017.05

-----------------
Testing the same with the mingw msys g++ compiler outputs no error:
g++.exe (Rev2, Built by MSYS2 project) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---------------
Also no errors for:
arm-linux-gnueabihf-g++.exe (Linaro GCC 6.3-2017.05)
---------------

Is there a special behavior for arm-eabi g++ compiler?

Best regards
  Martin Kaul

_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to