[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bug #36571] stdint.h: INTn_C not standard compliant
From: |
Georg-Johann Lay |
Subject: |
[avr-libc-dev] [bug #36571] stdint.h: INTn_C not standard compliant |
Date: |
Fri, 16 Nov 2012 23:00:00 +0000 |
User-agent: |
Opera/9.80 (Windows NT 5.0; U; de) Presto/2.6.30 Version/10.63 |
Follow-up Comment #1, bug #36571 (project avr-libc):
Here is the output for -mint8:
$ echo | avr-gcc-4.7.2 -x c - -E -dM -mint8 | sort | grep 'INT.*_C'
#define __INT16_C(c) c ## L
#define __INT32_C(c) c ## LL
#define __INT8_C(c) c
#define __INTMAX_C(c) c ## LL
#define __UINT16_C(c) c ## UL
#define __UINT32_C(c) c ## ULL
#define __UINT8_C(c) c ## U
#define __UINTMAX_C(c) c ## ULL
Notice that simply adopting this does not work with macros. Just consider:
#define F_CPU 0x80000
long f (void)
{
return INT32_C (F_CPU);
}
which works with
#define INT32_C(c) __INT32_C(c)
but fails with
#define INT32_C(c) c ## L
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?36571>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.nongnu.org/