diff options
author | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-14 18:32:05 +0000 |
---|---|---|
committer | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-14 18:32:05 +0000 |
commit | 4330e359b05723280974f493758f94d28f3d4ee0 (patch) | |
tree | c39f97c377f80f72e66b6d18fa02458c9e502efc | |
parent | 2b16c249529bdf6122d2a1642305be7ca4a2a8a8 (diff) | |
download | gcc-4330e359b05723280974f493758f94d28f3d4ee0.tar.gz |
Backport from 2013-01-14 trunk r195169.
PR target/55974
* config/avr/avr-c.c (avr_cpu_cpp_builtins): Define __FLASH
etc. to 1 and not to __flash.
Use LL suffix for __INT24_MAX__ with -mint8.
Use ULL suffix for __UINT24_MAX__ with -mint8.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@195170 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/avr/avr-c.c | 9 |
2 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f133f4831e..f543b2e1bf5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2013-01-14 Georg-Johann Lay <avr@gjlay.de> + + Backport from 2013-01-14 trunk r195169. + + PR target/55974 + * config/avr/avr-c.c (avr_cpu_cpp_builtins): Define __FLASH + etc. to 1 and not to __flash. + Use LL suffix for __INT24_MAX__ with -mint8. + Use ULL suffix for __UINT24_MAX__ with -mint8. + 2013-01-14 Matthias Klose <doko@ubuntu.com> * doc/invoke.texi: Document -print-multiarch. diff --git a/gcc/config/avr/avr-c.c b/gcc/config/avr/avr-c.c index 755361e2285..f8626732703 100644 --- a/gcc/config/avr/avr-c.c +++ b/gcc/config/avr/avr-c.c @@ -170,8 +170,7 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile) const char *name = avr_addrspace[i].name; char *Name = (char*) alloca (1 + strlen (name)); - cpp_define_formatted (pfile, "%s=%s", - avr_toupper (Name, name), name); + cpp_define (pfile, avr_toupper (Name, name)); } } @@ -188,7 +187,9 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile) /* Builtin macros for the __int24 and __uint24 type. */ - cpp_define (pfile, "__INT24_MAX__=8388607L"); + cpp_define_formatted (pfile, "__INT24_MAX__=8388607%s", + INT_TYPE_SIZE == 8 ? "LL" : "L"); cpp_define (pfile, "__INT24_MIN__=(-__INT24_MAX__-1)"); - cpp_define (pfile, "__UINT24_MAX__=16777215UL"); + cpp_define_formatted (pfile, "__UINT24_MAX__=16777215%s", + INT_TYPE_SIZE == 8 ? "ULL" : "UL"); } |