Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets.
From the Linux kernel commit 68a9bd0cd5824073e3232b102011ec568a517646
----------------------------------------------------------------
Olaf Hering [Wed, 17 Oct 2007 06:27:13 +0000 (23:27 -0700)]
Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets.
GCC can be made to warn about usage of long long types with ISO C90 (-ansi), but only with -pedantic. You can write this in a way that even then it doesn't cause warnings, namely by:
#ifdef __GNUC____extension__ typedef __signed__ long long __s64;__extension__ typedef unsigned long long __u64;
#endif
The __extension__ keyword in front of this switches off any pedantic warnings for this expression.
----------------------------------------------------------------
---
include/asm-arm/types.h | 6 +++--- include/asm-avr32/types.h | 6 +++--- include/asm-blackfin/types.h | 6 +++--- include/asm-m68k/types.h | 6 +++--- include/asm-mips/types.h | 6 +++--- include/asm-ppc/types.h | 6 +++--- include/asm-sh/types.h | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-)
include/asm-arm/types.h +3 -3
@@ -17,9 +17,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32;typedef unsigned int __u32 ; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif /*
include/asm-avr32/types.h +3 -3
@@ -39,9 +39,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32;typedef unsigned int __u32 ; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif #endif /* __ASSEMBLY__ */
include/asm-blackfin/types.h +3 -3
@@ -50,9 +50,9 @@ typedef __signed__ int __s32;typedef unsigned int __u32 ;/* HK0617 -- Changes to unsigned long temporarily */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif /*
include/asm-m68k/types.h +3 -3
@@ -14,9 +14,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32;typedef unsigned int __u32 ; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif typedef struct {
include/asm-mips/types.h +3 -3
@@ -33,9 +33,9 @@ typedef unsigned long __u64;#else -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif #endif
include/asm-ppc/types.h +3 -3
@@ -14,9 +14,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32;typedef unsigned int __u32 ; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif typedef struct {
include/asm-sh/types.h +3 -3
@@ -19,9 +19,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32;typedef unsigned int __u32 ; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif #endif /* __ASSEMBLY__ */
Wolfgang Denk
AppliedQuoted 20 lines · In message <[email protected]> you wrote:
Quoted 1 line
From the Linux kernel commit
68a9bd0cd5824073e3232b102011ec568a517646----------------------------------------------------------------
Olaf Hering [Wed, 17 Oct 2007 06:27:13 +0000 (23:27 -0700)]Remove the
__STRICT_ANSI__check from the __u64/__s64 declaration on 32bit targets.GCC can be made to warn about usage of long long types with ISO C90 (-ansi), but only with -pedantic. You can write this in a way that even then it doesn't cause warnings, namely by:
#ifdef
__GNUC____extension__typedef__signed__long long__s64;__extension__typedef unsigned long long__u64;
#endifThe
__extension__keyword in front of this switches off any pedantic warnings for this expression.
Quoted 7 lines
Signed-off-by Olaf Hering <[email protected]>Cc <[email protected]>Signed-off-by Andrew Morton <[email protected]>Signed-off-by Linus Torvalds <[email protected]>----------------------------------------------------------------
Signed-off-by Shinya Kuribayashi <[email protected]>
Applied, thanks!!
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Fools ignore complexity. Pragmatists suffer it. Some can avoid it.
Geniuses remove it.
- Perlis's Programming Proverb #58, SIGPLAN Notices, Sept. 1982The previous patch was lacking of i386, microblaze, nios and nios2. This patch tries to fix them.
---
include/asm-i386/types.h | 6 +++--- include/asm-microblaze/types.h | 6 +++--- include/asm-nios/types.h | 6 +++--- include/asm-nios2/types.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-)
include/asm-i386/types.h +3 -3
@@ -17,9 +17,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32;typedef unsigned int __u32 ; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif /*
include/asm-microblaze/types.h +3 -3
@@ -25,9 +25,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32;typedef unsigned int __u32 ; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif /*
include/asm-nios/types.h +3 -3
@@ -25,9 +25,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32;typedef unsigned int __u32 ; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif /*
include/asm-nios2/types.h +3 -3
@@ -25,9 +25,9 @@ typedef unsigned short __u16; typedef __signed__ int __s32;typedef unsigned int __u32 ; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; +#if defined(__GNUC__) +__extension__typedef __signed__ long long __s64 ; +__extension__typedef unsigned long long __u64 ;#endif /*
Wolfgang Denk
AppliedQuoted 11 lines · In message <[email protected]> you wrote:
The previous patch was lacking of i386, microblaze, nios and nios2. This patch tries to fix them.
Signed-off-by Shinya Kuribayashi <[email protected]>---
include/asm-i386/types.h | 6 +++--- include/asm-microblaze/types.h | 6 +++--- include/asm-nios/types.h | 6 +++--- include/asm-nios2/types.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Nothing is easier than to denounce the evildoer; nothing is more difficult than to understand him. - Fyodor Dostoevski