Message ID | 20130826110126.a43cg9k6m88wgkk8-nzlynne@webmail.spamcop.net |
---|---|
State | New |
Headers | show |
2013/8/26 Joern Rennecke <joern.rennecke@embecosm.com>: > 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". > It seems reasonable for me. Please apply. Denis.
Joern Rennecke wrote: > This patch fixes the gcc.dg/c99-stdint-5.c and gcc.dg/c99-stdint-6.c > excess error failures. FYI, some of the problems with the c99-stdint tests are related to the stdint.h implementation in use. For example, some types in AVR-Libc's stdint.h are not defined in the way the GCC test suite expects them: AVR-Libc defines most C99 types by means of attribute mode. https://savannah.nongnu.org/bugs/?34695#comment7 Johann
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)