aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-cppbuiltin.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2003-03-12 21:30:06 +0100
committerAndreas Jaeger <aj@gcc.gnu.org>2003-03-12 21:30:06 +0100
commit00530a212ba678acf2f0719789f53865c8cd7e71 (patch)
tree9e98baba4b769e2c50cd932b73d28268fbdd9eff /gcc/c-cppbuiltin.c
parent5474eed5c6ab39da71c698f49f62e670b49267cc (diff)
downloadgcc-00530a212ba678acf2f0719789f53865c8cd7e71.zip
gcc-00530a212ba678acf2f0719789f53865c8cd7e71.tar.gz
gcc-00530a212ba678acf2f0719789f53865c8cd7e71.tar.bz2
c-cppbuiltin.c (cb_register_builtins): Define LP64 builtins for LP64 targets.
* c-cppbuiltin.c (cb_register_builtins): Define LP64 builtins for LP64 targets. * doc/cpp.texi (Common Predefined Macros): Document __LP64__ and _LP64. * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Do not define _LP64 macros here. * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Likewise. * config/alpha/netbsd.h (TARGET_OS_CPP_BUILTINS): Remove call to NETBSD_OS_CPP_BUILTINS_LP64. * config/sh/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Likewise. * config/sparc/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Likewise. * config/netbsd.h (NETBSD_OS_CPP_BUILTINS_LP64): Remove. From-SVN: r64259
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 35c1645..a396b6b 100644
--- a/gcc/c-cppbuiltin.c
+++ b/gcc/c-cppbuiltin.c
@@ -339,6 +339,15 @@ cb_register_builtins (pfile)
/* Misc. */
builtin_define_with_value ("__VERSION__", version_string, 1);
+ /* Definitions for LP64 model. */
+ if (TYPE_PRECISION (long_integer_type_node) == 64
+ && POINTER_SIZE == 64
+ && TYPE_PRECISION (integer_type_node) == 32)
+ {
+ cpp_define (pfile, "_LP64");
+ cpp_define (pfile, "__LP64__");
+ }
+
/* Other target-independent built-ins determined by command-line
options. */
if (optimize_size)