This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
INSERT_ATTRIBUTES and PRAGMA_INSERT_ATTRIBUTES
- To: <gcc at gcc dot gnu dot org>
- Subject: INSERT_ATTRIBUTES and PRAGMA_INSERT_ATTRIBUTES
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Fri, 29 Jun 2001 23:27:15 +0100 (BST)
- cc: <amylaar at redhat dot com>, <aoliva at redhat dot com>, <khan at xraylith dot wisc dot edu>, <nickc at redhat dot com>, <scox at redhat dot com>
I asked this in another thread, but perhaps it should be asked on its own:
What are INSERT_ATTRIBUTES and PRAGMA_INSERT_ATTRIBUTES for, and what is
the difference between them? INSERT_ATTRIBUTES is documented as a target
macro, but the only port to use either is the SH port, which uses
PRAGMA_INSERT_ATTRIBUTES. It seems that PRAGMA_INSERT_ATTRIBUTES used to
be defined by c-pragma.h but this was deleted by
Tue Oct 19 11:41:12 1999 Mumit Khan <khan@xraylith.wisc.edu>
* c-pragma.h (PRAGMA_INSERT_ATTRIBUTES): Delete macro.
(insert_pack_attributes): Delete prototype.
It seems that INSERT_ATTRIBUTES was added by
Wed Sep 2 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
* c-common,c (decl_attributes): If defined call the expression
contained within the INSERT_ATTRIBUTES macro before adding
attributes to a decl.
* tm.texi (HANDLE_PRAGMA): Document the new version of
HANDLE_PRAGMA, which takes three arguments.
(INSERT_ATTRIBUTES): Document this new macro.
* LANGUAGES: Document the new version of HANDLE_PRAGMA and the
new INSERT_ATTRIBUTES macro.
It seems the SH use of PRAGMA_INSERT_ATTRIBUTES was added by
Fri Dec 11 11:02:49 1998 Stan Cox <scox@cygnus.com>
* sh.c (print_operand): Lookup interrupt_handler attribute instead
of relying on static variable.
* (calc_live_regs): Likewise.
* (sh_pragma_insert_attributes): Create interrupt_handler
attribute if a pragma was specified.
* (sh_valid_machine_decl_attribute): Don't set static flag.
* sh.h (PRAGMA_INSERT_ATTRIBUTES): New.
Can PRAGMA_INSERT_ATTRIBUTES die? Should the SH port be using
INSERT_ATTRIBUTES instead?
--
Joseph S. Myers
jsm28@cam.ac.uk