AVR C Runtime Library - Bugs: bug #36571, stdint.h: INTn_C not standard...
You are not allowed to post comments on this tracker with your current authentication level.
bug #36571: stdint.h: INTn_C not standard compliant
Submitter: | Georg-Johann Lay <gjlayde> | ||
Submitted: | Thu 31 May 2012 08:02:57 PM UTC | ||
Category: | Header | Severity: | 3 - Normal |
Priority: | 9 - Immediate | Item Group: | Header files |
Status: | None | Assigned to: | None |
Percent Complete: | 0% | Open/Closed: | Open |
Release: | 1.8.0 | Fixed Release: | None |
Fri 16 Nov 2012 11:00:00 PM UTC, comment #1: |
Georg-Johann Lay <gjlayde> |
Thu 31 May 2012 08:02:57 PM UTC, original submission:
C99: 7.18.4 Macros for integer constants
|
Georg-Johann Lay <gjlayde> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2012-11-16 | arcanum | Priority | 5 - Normal | 9 - Immediate |
Powered by Savane 3.13-f8d8.
Corresponding source code
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