public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: __attribute__ ((deprecated))
@ 2001-04-23 21:04 Anthony Green
  2001-04-24  3:53 ` Philipp Thomas
  0 siblings, 1 reply; 16+ messages in thread
From: Anthony Green @ 2001-04-23 21:04 UTC (permalink / raw)
  To: shebs; +Cc: gcc

Stan wrote:
> 3. If yes, what are the implementation caveats to watch out for?
>    (needs to work for all of C/ObjC/C++)

This looks cool, but how would this work with localized compilers?

> 	extern int worse_fn (char)
> 	  __attribute__ ((deprecated "use new_good_fn instead"));
> 
> to get
> 
> 	warning: worse_fn is deprecated; use new_good_fn instead

We would need some scheme for localizing these messages, or just put
up with mixed language compiler warnings.

AG

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: __attribute__ ((deprecated))
@ 2001-04-27  7:27 Philipp Thomas
  2001-04-27 15:43 ` Joern Rennecke
  0 siblings, 1 reply; 16+ messages in thread
From: Philipp Thomas @ 2001-04-27  7:27 UTC (permalink / raw)
  To: Anthony Green; +Cc: shebs, gcc

* Anthony Green (green@redhat.com) [20010424 19:20]:

> > (which would mark it as translatable string and thus it would appear in
> > gcc.pot) and have the compiler call gettext.
> 
> Are you sure?  I guess I don't understand GCC's i18n support.  Stan's
> proposal has part of the message in the user's source code.  How would that
> ever end up in gcc.pot?

Forget it. I wrote that much too late for me and didn't think straight. Of
course this is user code so it would always be in the language it was
written in.

Philipp

-- 
Penguins shall save the dinosaurs
                          -- Handelsblatt about Linux on S/390

^ permalink raw reply	[flat|nested] 16+ messages in thread
* __attribute__ ((deprecated))
@ 2001-04-23 19:30 Stan Shebs
  2001-04-23 19:50 ` Geoff Keating
  2001-04-23 20:12 ` Marcus G. Daniels
  0 siblings, 2 replies; 16+ messages in thread
From: Stan Shebs @ 2001-04-23 19:30 UTC (permalink / raw)
  To: gcc

Now that Mac OS X has had its first release, the library people are
already thinking of ways to change the API for the next release
(hopefully for the better, but I won't editorialize further. :-) )
To help out developers, they've asked that the compiler support some
way to warn people that a particular function or variable may
go away or be changed at some point.

The obvious thing would be to add a new attribute, so that a header
could have something like

	extern int old_bad_fn (int) __attribute__ ((deprecated));

then any calls or references to old_bad_fn would get something like

	warning: old_bad_fn is deprecated

As an enhancement, the library folks would also like to be able
to add a more specific message:

	extern int worse_fn (char)
	  __attribute__ ((deprecated "use new_good_fn instead"));

to get

	warning: worse_fn is deprecated; use new_good_fn instead

Before we jump into implementing this, we'd like to get some input.

1. Does this seem like a worthwhile feature to add?
2. If no, what would be an equivalent alternative?
3. If yes, what are the implementation caveats to watch out for?
   (needs to work for all of C/ObjC/C++)

Thanks for any and all advice!

Stan

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

end of thread, other threads:[~2001-04-27 15:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-23 21:04 __attribute__ ((deprecated)) Anthony Green
2001-04-24  3:53 ` Philipp Thomas
2001-04-24 10:20   ` Anthony Green
2001-04-24 10:38     ` Tom Tromey
2001-04-24 12:06       ` Tim Hollebeek
2001-04-24 12:50         ` Anthony Green
2001-04-24 13:40           ` Stan Shebs
2001-04-24 12:42       ` Stan Shebs
2001-04-27  7:13     ` Philipp Thomas
  -- strict thread matches above, loose matches on Subject: below --
2001-04-27  7:27 Philipp Thomas
2001-04-27 15:43 ` Joern Rennecke
2001-04-23 19:30 Stan Shebs
2001-04-23 19:50 ` Geoff Keating
2001-04-23 20:12 ` Marcus G. Daniels
2001-04-24 12:47   ` Stan Shebs
2001-04-24 13:34     ` Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).