This is the mail archive of the gcc@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]

INSERT_ATTRIBUTES and PRAGMA_INSERT_ATTRIBUTES


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


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