This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR41632, deprecated #ident


On Fri, Oct 9, 2009 at 2:09 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Fri, Oct 9, 2009 at 11:07 PM, Neil Vachharajani <nvachhar@google.com> wrote:
>> This patch removes the deprecation warning for #ident and #sccs. ?As
>> per a discussion on gcc, these?two directives should probably not have
>> been deprecated in the first place.
>>
>> Bootstrapped, and regression tested. ?Okay for trunk?
>
> The patch should adjust doc/cpp.texi to no longer mark the extensions
> as deprecated as well.
>
> Richard.

Okay, here is the new patch:

Index: libcpp/directives.c
===================================================================
--- libcpp.orig/directives.c    2009-10-09 09:33:10.000000000 -0700
+++ libcpp/directives.c 2009-10-09 09:33:50.000000000 -0700
@@ -151,11 +151,11 @@
 D(pragma,      T_PRAGMA,       STDC89,    IN_I)           /*    195 */ \
 D(warning,     T_WARNING,      EXTENSION, 0)              /*     22 */ \
 D(include_next,        T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND)  /*
  19 */ \
-D(ident,       T_IDENT,        EXTENSION, IN_I | DEPRECATED) /*     11 */ \
+D(ident,       T_IDENT,        EXTENSION, IN_I)           /*     11 */ \
 D(import,      T_IMPORT,       EXTENSION, INCL | EXPAND)  /* 0 ObjC */ \
 D(assert,      T_ASSERT,       EXTENSION, DEPRECATED)     /* 0 SVR4 */ \
 D(unassert,    T_UNASSERT,     EXTENSION, DEPRECATED)     /* 0 SVR4 */ \
-D(sccs,                T_SCCS,         EXTENSION, IN_I | DEPRECATED)
/* 0 SVR4? */
+D(sccs,                T_SCCS,         EXTENSION, IN_I)           /* 0 SVR4? */

 /* #sccs is synonymous with #ident.  */
 #define do_sccs do_ident
Index: gcc/doc/cpp.texi
===================================================================
--- gcc.orig/doc/cpp.texi    (revision 152576)
+++ gcc/doc/cpp.texi    (working copy)
@@ -3609,8 +3609,6 @@
 official GNU extensions either.  What historical information we have
 been able to find, suggests they originated with System V@.

-Both @samp{#ident} and @samp{#sccs} are deprecated extensions.
-
 @cindex null directive
 The @dfn{null directive} consists of a @samp{#} followed by a newline,
 with only whitespace (including comments) in between.  A null directive


>
>> 2009-10-09 ?Neil Vachharajani <nvachhar@google.com>
>>
>> ? ? ? ?* directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and
>> ? ? ? ?sccs.
>>
>> Index: libcpp/directives.c
>> ===================================================================
>> --- libcpp.orig/directives.c ? ?2009-10-09 09:33:10.000000000 -0700
>> +++ libcpp/directives.c 2009-10-09 09:33:50.000000000 -0700
>> @@ -151,11 +151,11 @@
>> ?D(pragma, ? ? ?T_PRAGMA, ? ? ? STDC89, ? ?IN_I) ? ? ? ? ? /* ? ?195 */ \
>> ?D(warning, ? ? T_WARNING, ? ? ?EXTENSION, 0) ? ? ? ? ? ? ?/* ? ? 22 */ \
>> ?D(include_next, ? ? ? ?T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND) ?/*
>> ? 19 */ \
>> -D(ident, ? ? ? T_IDENT, ? ? ? ?EXTENSION, IN_I | DEPRECATED) /* ? ? 11 */ \
>> +D(ident, ? ? ? T_IDENT, ? ? ? ?EXTENSION, IN_I) ? ? ? ? ? /* ? ? 11 */ \
>> ?D(import, ? ? ?T_IMPORT, ? ? ? EXTENSION, INCL | EXPAND) ?/* 0 ObjC */ \
>> ?D(assert, ? ? ?T_ASSERT, ? ? ? EXTENSION, DEPRECATED) ? ? /* 0 SVR4 */ \
>> ?D(unassert, ? ?T_UNASSERT, ? ? EXTENSION, DEPRECATED) ? ? /* 0 SVR4 */ \
>> -D(sccs, ? ? ? ? ? ? ? ?T_SCCS, ? ? ? ? EXTENSION, IN_I | DEPRECATED)
>> /* 0 SVR4? */
>> +D(sccs, ? ? ? ? ? ? ? ?T_SCCS, ? ? ? ? EXTENSION, IN_I) ? ? ? ? ? /* 0 SVR4? */
>>
>> ?/* #sccs is synonymous with #ident. ?*/
>> ?#define do_sccs do_ident
>>
>



-- 
Neil Vachharajani
Google
650-214-1804


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]