[Arm] Allow the use of arm_cde.h for C++
authorMatthew Malcomson <matthew.malcomson@arm.com>
Thu, 9 Apr 2020 15:11:09 +0000 (16:11 +0100)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Thu, 9 Apr 2020 15:11:09 +0000 (16:11 +0100)
commita4d2774c9c1e213cb129c8b81a591297669838c8
tree2fdaed046a07816384088601330b27dc160102e1
parentbbb0de4a4ac9d6b6b6ca6be4755913bf4379d51a
[Arm] Allow the use of arm_cde.h for C++

arm_cde.h includes the arm_mve_types.h header, which declares some C++
overloaded functions.

There is a superfluous `extern "C"` statement in arm_cde.h, which
encompasses these functions.  This means that if compiling for C++, the
overloaded functions are declared, but are declared without name
mangling.  Hence all the function names are the same and we have many
conflicting declarations.

Testing Done:
  Regression tested for arm-none-eabi.

gcc/ChangeLog:

2020-04-09  Matthew Malcomson  <matthew.malcomson@arm.com>

* config/arm/arm_cde.h: Remove `extern "C"` when compiling for
C++.

gcc/testsuite/ChangeLog:

2020-04-09  Matthew Malcomson  <matthew.malcomson@arm.com>

* g++.target/arm/cde_mve.C: New test.
gcc/ChangeLog
gcc/config/arm/arm_cde.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.target/arm/cde_mve.C [new file with mode: 0644]