This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Extension compatibility policy
- From: Paul Schlie <schlie at comcast dot net>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>,Giovanni Bajo <giovannibajo at libero dot it>,Mike Hearn <mike at navi dot cx>,<gcc at gcc dot gnu dot org>
- Date: Tue, 01 Mar 2005 20:13:44 -0500
- Subject: Re: Extension compatibility policy
> Joseph S. Myers writes:
> How about calling decl_attributes from fname_decl so a target
> insert_attributes hook can add attributes to __func__? Would that suffice
> to solve your problem?
Might it be possible to alternatively add an attribute symbol hook so that a
target may easily define an arbitrary target specific named attribute which
may be utilized without having to patch the parser, etc. to do so?
Thereby one could easily define a ROM and/or PMEM attribute hypothetically
for not only __FUNCTION__, but any arbitrary declared type or parameter
declaration, preserved through to the back end to aid in target specific
code generation and/or memory allocation?
PMEM __FUNCTION__
ROM static const x[] = "some string"
char y[] = ROM "some string"
struct {int a; int b;} z = PMEM {5312, 3421};
For example? (with a little luck this could kill two bird with one stone)