* [U-Boot-Users] Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets.
@ 2008-02-23 8:24 Shinya Kuribayashi
2008-02-23 8:50 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Shinya Kuribayashi @ 2008-02-23 8:24 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Olaf Hering <olh@suse.de>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
----------------------------------------------------------------
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---
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(-)
diff --git a/include/asm-arm/types.h b/include/asm-arm/types.h
index 13e9806..e56f19d 100644
--- a/include/asm-arm/types.h
+++ b/include/asm-arm/types.h
@@ -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
/*
diff --git a/include/asm-avr32/types.h b/include/asm-avr32/types.h
index e6c65d9..2dbea4b 100644
--- a/include/asm-avr32/types.h
+++ b/include/asm-avr32/types.h
@@ -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__ */
diff --git a/include/asm-blackfin/types.h b/include/asm-blackfin/types.h
index 665a419..9fd8e03 100644
--- a/include/asm-blackfin/types.h
+++ b/include/asm-blackfin/types.h
@@ -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
/*
diff --git a/include/asm-m68k/types.h b/include/asm-m68k/types.h
index e673cb0..e944d3f 100644
--- a/include/asm-m68k/types.h
+++ b/include/asm-m68k/types.h
@@ -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 {
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h
index e757e22..707cbf4 100644
--- a/include/asm-mips/types.h
+++ b/include/asm-mips/types.h
@@ -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
diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h
index 4ebbb9e..7adf145 100644
--- a/include/asm-ppc/types.h
+++ b/include/asm-ppc/types.h
@@ -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 {
diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h
index fd00dbb..7ba69d9 100644
--- a/include/asm-sh/types.h
+++ b/include/asm-sh/types.h
@@ -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__ */
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot-Users] Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets.
2008-02-23 8:24 [U-Boot-Users] Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets Shinya Kuribayashi
@ 2008-02-23 8:50 ` Wolfgang Denk
2008-02-24 2:44 ` Shinya Kuribayashi
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2008-02-23 8:50 UTC (permalink / raw)
To: u-boot
In message <47BFD830.6000701@ruby.dti.ne.jp> you wrote:
> >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.
>
> Signed-off-by: Olaf Hering <olh@suse.de>
> Cc: <linux-arch@vger.kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> ----------------------------------------------------------------
>
> Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Applied, thanks!!
Best regards,
Wolfgang Denk
--
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. 1982
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets.
2008-02-23 8:50 ` Wolfgang Denk
@ 2008-02-24 2:44 ` Shinya Kuribayashi
2008-03-02 20:11 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Shinya Kuribayashi @ 2008-02-24 2:44 UTC (permalink / raw)
To: u-boot
The previous patch was lacking of i386, microblaze, nios and nios2. This
patch tries to fix them.
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---
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(-)
diff --git a/include/asm-i386/types.h b/include/asm-i386/types.h
index 69f8a5a..bdbde41 100644
--- a/include/asm-i386/types.h
+++ b/include/asm-i386/types.h
@@ -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
/*
diff --git a/include/asm-microblaze/types.h b/include/asm-microblaze/types.h
index 8c4bef2..3895dc4 100644
--- a/include/asm-microblaze/types.h
+++ b/include/asm-microblaze/types.h
@@ -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
/*
diff --git a/include/asm-nios/types.h b/include/asm-nios/types.h
index 43fd8f6..24c98a8 100644
--- a/include/asm-nios/types.h
+++ b/include/asm-nios/types.h
@@ -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
/*
diff --git a/include/asm-nios2/types.h b/include/asm-nios2/types.h
index 39e2641..f13d8bd 100644
--- a/include/asm-nios2/types.h
+++ b/include/asm-nios2/types.h
@@ -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
/*
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot-Users] Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets.
2008-02-24 2:44 ` Shinya Kuribayashi
@ 2008-03-02 20:11 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-03-02 20:11 UTC (permalink / raw)
To: u-boot
In message <47C0DA0D.4070208@ruby.dti.ne.jp> you wrote:
> The previous patch was lacking of i386, microblaze, nios and nios2. This
> patch tries to fix them.
>
> Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
> ---
>
> 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
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-02 20:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-23 8:24 [U-Boot-Users] Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets Shinya Kuribayashi
2008-02-23 8:50 ` Wolfgang Denk
2008-02-24 2:44 ` Shinya Kuribayashi
2008-03-02 20:11 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox