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] Add "unavailable" attribute [ObjC V1 prerequisite].



On 16 Apr 2010, at 20:04, Joseph S. Myers wrote:


On Fri, 16 Apr 2010, IainS wrote:

As noted above, the semantics of this are identical to those of the
deprecation attribute (one would expect them to be applied to the same
positions in source code). I have also borrowed heavily from the deprecation
implementation.

I don't like duplicating all the infrastructure like this. It would seem
better to me to expand TREE_DEPRECATED to more than one bit to allow
different levels of deprecation to be represented without duplicating a
load of code.

This might be marginal since the main actual duplication is in "handle_xxxx" and the
top level section which either prints warning or error.


I thought about parameterizing these routines whilst doing this, and came to the conclusion that it wouldn't save a lot.
However, of course, I will give it some more thought.


During modification of the deprecation code, I came across cases where this
latter was not being done and amended the code accordingly.

All such changes should be sent as a separate patch with its own testcases.

OK, will do


I also found that there were a few cases were two warnings were emitted for a
single source error.
I've rearranged the checks to the best of my ability to avoid that (for both
deprecation and unavailability).

Likewise (though it may not be possible to add testcases for duplication
of diagnostics).

No, I don't think we can - one has to check the .log files manually (which I was doing).





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