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]: __attribute__((deprecated)) (revision2)


At 8:13 PM -0500 1/8/02, Phil Edwards wrote:

>On Tue, Jan 08, 2002 at 05:23:54PM -0800, Ira Ruben wrote:
>> At 12:28 PM -0500 1/8/02, Phil Edwards wrote:
>> >I have an old "generalized warning" attribute patch locally, and this
>> >is one of the intended uses.  Its semantics are basically a superset
>> >of the patch under consideration, but it's a lot less code... I must be
>> >overlooking something.  :-)
>>
>> A superset with less code?  I'm curious how.
>
>Simple.  I only test for uses in the C++ front-end.  :-)  As a libstdc++
>developer, I don't write in C....  Also, I'm sure I forgot stuff.
>
>It's a superset only in the sense that you can use it to warn about
>deprecated code, funky extensions, whatever.
>
>My initial goal was to find some way of flagging HP/SGI/GNU extensions in
>libstdc++ when -pedantic was given.  I couldn't think of a good warning
>text that would apply in all cases, so I opened it up and made the text
>part of the attribute.  The example I generated is below.  I haven't had
>time since to persue it.
>
>The biggest problem is that function calls don't point to the file&line
>where they were declared, but I never had time to track that down either.

Where you the one who, some time ago mailed Stan Shebs asking about my
(original) patch , which I submitted last year?  Someone was asking
about it to flag deprecated stuff in stl I believe.

Of course my patch addresses C and C++, uses in decls and uses in
expressions (hopefully any use anywhere).  So there's stuff sprinkled
in various places.  I did toss around the idea like yours of tagging
the attribute with a string of the user's choosing.  But that would
cost an additional pointer in the tree nodes which is way too costly
(at least in the OSX environment with so many includes).  So we are
expecting users of the attribute to place some meaningful comment at
the point of the attribute.  This is why I try to include where the
attribute appeared in the displayed warning.

Ira


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