aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2013-01-14 18:28:24 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2013-01-14 18:28:24 +0000
commitaeb8b4e96cbe526eb810794568909659d73b16dd (patch)
tree3e167657e4f5e4af8f9933fd646b3834fa23f2ff /gcc/config/avr
parente3c063ceda2aad832267b81c14e2e5e18023371c (diff)
downloadgcc-aeb8b4e96cbe526eb810794568909659d73b16dd.zip
gcc-aeb8b4e96cbe526eb810794568909659d73b16dd.tar.gz
gcc-aeb8b4e96cbe526eb810794568909659d73b16dd.tar.bz2
re PR target/55974 ([avr] Wrong suffix for built-in defines __INT24_MAX__ and __UINT24_MAX__ with -mint8)
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. From-SVN: r195169
Diffstat (limited to 'gcc/config/avr')
-rw-r--r--gcc/config/avr/avr-c.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/config/avr/avr-c.c b/gcc/config/avr/avr-c.c
index f8b2b20..2685f4b 100644
--- a/gcc/config/avr/avr-c.c
+++ b/gcc/config/avr/avr-c.c
@@ -169,8 +169,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));
}
}
@@ -187,7 +186,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");
}