From b3862e93aeaa7d89b6f14bd12eb29abedbf7d2f2 Mon Sep 17 00:00:00 2001 From: Peter Bigot Date: Mon, 12 Aug 2019 12:55:54 -0500 Subject: [PATCH] soc/arm/xilinx_zynqmp: clean up use of extern "C" Remove extern "C" support from files that don't declare symbols subject to language linkage effects. Background from issue #17997: Declarations that use C linkage should be placed within extern "C" so the language linkage is correct when the header is included by a C++ compiler. Similarly #include directives should be outside the extern "C" to ensure the language-specific default linkage is applied to any declarations provided by the included header. See: https://en.cppreference.com/w/cpp/language/language_linkage Signed-off-by: Peter Bigot --- soc/arm/xilinx_zynqmp/soc.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/soc/arm/xilinx_zynqmp/soc.h b/soc/arm/xilinx_zynqmp/soc.h index 6c212d1c99d..6df67841233 100644 --- a/soc/arm/xilinx_zynqmp/soc.h +++ b/soc/arm/xilinx_zynqmp/soc.h @@ -10,10 +10,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - #ifndef _ASMLANGUAGE #include @@ -21,8 +17,4 @@ extern "C" { #endif /* !_ASMLANGUAGE */ -#ifdef __cplusplus -} -#endif - #endif /* _BOARD__H_ */