From c1ac587e6f44e0373754281c31edc64625541999 Mon Sep 17 00:00:00 2001 From: bernie Date: Sun, 3 Oct 2004 18:35:13 +0000 Subject: [PATCH] Poison C++ keywords in C programs for better portability. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@220 38d2e660-2303-0410-9eaa-f027e97ec537 --- compiler.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/compiler.h b/compiler.h index b7c78f11..1a5d4c0e 100755 --- a/compiler.h +++ b/compiler.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.24 2004/10/03 18:35:13 bernie + *#* Poison C++ keywords in C programs for better portability. + *#* *#* Revision 1.23 2004/09/20 03:30:27 bernie *#* Remove vsprintf_P() proto, no longer needed with avr-libc 1.0.4. *#* @@ -195,6 +198,17 @@ #endif + #ifndef __cplusplus + /* + * Disallow some C++ keywords as identifiers in C programs, + * for improved portability. + */ + #pragma GCC poison new delete class template typename + #pragma GCC poison private protected public operator + #pragma GCC poison friend mutable using namespace + #pragma GCC poison cin cout cerr clog + #endif + #elif defined(__MWERKS__) && CPU_DSP56K #include -- 2.25.1