aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-cppbuiltin.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-08-04 19:37:19 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2004-08-04 19:37:19 +0000
commit63c5b4952ee1141038f756fc5a44511296ad7f8e (patch)
tree3e625b8f05cee8c131162ddd24141215d432a989 /gcc/c-cppbuiltin.c
parent564076f545d934c127dcef53c0e7c60e199cf55e (diff)
downloadgcc-63c5b4952ee1141038f756fc5a44511296ad7f8e.zip
gcc-63c5b4952ee1141038f756fc5a44511296ad7f8e.tar.gz
gcc-63c5b4952ee1141038f756fc5a44511296ad7f8e.tar.bz2
defaults.h (TARGET_DECLSPEC): New macro.
* defaults.h (TARGET_DECLSPEC): New macro. * c-cppbuiltin.c (c_cpp_builtins): Handle TARGET_DECLSPEC. * config/arm/pe.h (SUBTARGET_CPP_SPEC): Remove __declspec support. * config/arm/symbian. (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. * config/i386/beof-elf.h (TARGET_OS_CPP_BUILTINS): Remove __declspec support. (TARGET_DECLSPEC): Define. * config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Remove __declspec support. * config/i386/i386-interix.h (TARGET_OS_CPP_BUILTINS): Remove __declspec support. (TARGET_DECLSPEC): Define. * config/mcore/mcore.h (TARGET_CPU_CPP_BUILTINS): Remove __declspec support. * config/sh/symbian-pre.h (SUBTARGET_CPP_SPEC): Remove __declspec support. * doc/tm.texi (TARGET_DECLSPEC): Document. * doc/extend.texi: Fix typo in comment. From-SVN: r85571
Diffstat (limited to 'gcc/c-cppbuiltin.c')
-rw-r--r--gcc/c-cppbuiltin.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c
index 3f0f688..441a38e 100644
--- a/gcc/c-cppbuiltin.c
+++ b/gcc/c-cppbuiltin.c
@@ -426,6 +426,15 @@ c_cpp_builtins (cpp_reader *pfile)
TARGET_CPU_CPP_BUILTINS ();
TARGET_OS_CPP_BUILTINS ();
TARGET_OBJFMT_CPP_BUILTINS ();
+
+ /* Support the __declspec keyword by turning them into attributes.
+ Note that the current way we do this may result in a collision
+ with predefined attributes later on. This can be solved by using
+ one attribute, say __declspec__, and passing args to it. The
+ problem with that approach is that args are not accumulated: each
+ new appearance would clobber any existing args. */
+ if (TARGET_DECLSPEC)
+ builtin_define ("__declspec(x)=__attribute__((x))");
}
/* Pass an object-like macro. If it doesn't lie in the user's