This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: fix some avr stdint issues
- From: Joern Rennecke <joern dot rennecke at embecosm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Denis Chertykov <chertykov at gmail dot com>, Anatoly Sokolov <aesok at post dot ru>, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Mon, 26 Aug 2013 11:01:26 -0400
- Subject: RFA: fix some avr stdint issues
- Authentication-results: sourceware.org; auth=none
This patch fixes the gcc.dg/c99-stdint-5.c and gcc.dg/c99-stdint-6.c
excess error
failures.
Tested for atmega128-sim.
OK to apply?
2013-05-26 Joern Rennecke <joern.rennecke@embecosm.com>
* config/avr/avr-stdint.h (INT16_TYPE): Change default to "int".
(UINT16_TYPE): Change default to "unsigned int".
Index: config/avr/avr-stdint.h
===================================================================
--- config/avr/avr-stdint.h (revision 201989)
+++ config/avr/avr-stdint.h (working copy)
@@ -34,11 +34,11 @@ the Free Software Foundation; either ver
#define SIG_ATOMIC_TYPE "char"
#define INT8_TYPE "signed char"
-#define INT16_TYPE (INT_TYPE_SIZE == 16 ? "short int" : "long int")
+#define INT16_TYPE (INT_TYPE_SIZE == 16 ? "int" : "long int")
#define INT32_TYPE (INT_TYPE_SIZE == 16 ? "long int" : "long long int")
#define INT64_TYPE (INT_TYPE_SIZE == 16 ? "long long int" : 0)
#define UINT8_TYPE "unsigned char"
-#define UINT16_TYPE (INT_TYPE_SIZE == 16 ? "short unsigned int" : "long unsigned int")
+#define UINT16_TYPE (INT_TYPE_SIZE == 16 ? "unsigned int" : "long unsigned int")
#define UINT32_TYPE (INT_TYPE_SIZE == 16 ? "long unsigned int" : "long long unsigned int")
#define UINT64_TYPE (INT_TYPE_SIZE == 16 ? "long long unsigned int" : 0)