public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] __deprecated requires gcc 3.1
@ 2002-12-31 22:32 Robert Love
  2002-12-31 23:13 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Love @ 2002-12-31 22:32 UTC (permalink / raw)
  To: torvalds; +Cc: James.Bottomley, linux-kernel

Linus,

James Bottomley confirmed the "deprecated" attribute requires gcc 3.1
and onward, not gcc 3.0.

Attached patch updates the check in compiler.h to require gcc 3.1 or
greater.

Patch is against current BK, please apply.

	Robert Love

 include/linux/compiler.h |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


diff -urN linux-2.5.53/include/linux/compiler.h linux/include/linux/compiler.h
--- linux-2.5.53/include/linux/compiler.h~	2002-12-31 17:27:53.000000000 -0500
+++ linux/include/linux/compiler.h	2002-12-31 17:29:09.000000000 -0500
@@ -17,10 +17,9 @@
  * Allow us to mark functions as 'deprecated' and have gcc emit a nice
  * warning for each use, in hopes of speeding the functions removal.
  * Usage is:
- * 		int deprecated foo(void)
- * and then gcc will emit a warning for each usage of the function.
+ * 		int __deprecated foo(void)
  */
-#if __GNUC__ >= 3
+#if ( __GNUC__ == 3 && __GNUC_MINOR > 0 ) || __GNUC__ > 3
 #define __deprecated	__attribute__((deprecated))
 #else
 #define __deprecated




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] __deprecated requires gcc 3.1
  2002-12-31 22:32 [PATCH] __deprecated requires gcc 3.1 Robert Love
@ 2002-12-31 23:13 ` James Bottomley
  2002-12-31 23:44   ` Robert Love
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2002-12-31 23:13 UTC (permalink / raw)
  To: Robert Love; +Cc: torvalds, James.Bottomley, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 95 bytes --]

Oops, mea culpa on that one.  It's missing a trailing `__' on the end of 
__GNUC_MINOR

James


[-- Attachment #2: tmp.diff --]
[-- Type: text/plain , Size: 452 bytes --]

===== include/linux/compiler.h 1.8 vs edited =====
--- 1.8/include/linux/compiler.h	Sun Dec 29 12:52:54 2002
+++ edited/include/linux/compiler.h	Tue Dec 31 17:12:32 2002
@@ -20,7 +20,7 @@
  * 		int deprecated foo(void)
  * and then gcc will emit a warning for each usage of the function.
  */
-#if __GNUC__ >= 3
+#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
 #define __deprecated	__attribute__((deprecated))
 #else
 #define __deprecated

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] __deprecated requires gcc 3.1
  2002-12-31 23:13 ` James Bottomley
@ 2002-12-31 23:44   ` Robert Love
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Love @ 2002-12-31 23:44 UTC (permalink / raw)
  To: torvalds; +Cc: James Bottomley, linux-kernel

On Tue, 2002-12-31 at 18:13, James Bottomley wrote:

> Oops, mea culpa on that one.  It's missing a trailing `__' on the end of 
> __GNUC_MINOR

Looks like Linus already committed it.

Attached patch is against the updated BK and fixes the omission.  Sorry.

	Robert Love

 include/linux/compiler.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -urN linux-2.5.53/include/linux/compiler.h linux/include/linux/compiler.h
--- linux-2.5.53/include/linux/compiler.h	2002-12-31 18:39:55.000000000 -0500
+++ linux/include/linux/compiler.h	2002-12-31 18:40:10.000000000 -0500
@@ -19,7 +19,7 @@
  * Usage is:
  * 		int __deprecated foo(void)
  */
-#if ( __GNUC__ == 3 && __GNUC_MINOR > 0 ) || __GNUC__ > 3
+#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
 #define __deprecated	__attribute__((deprecated))
 #else
 #define __deprecated




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-12-31 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-31 22:32 [PATCH] __deprecated requires gcc 3.1 Robert Love
2002-12-31 23:13 ` James Bottomley
2002-12-31 23:44   ` Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox