Quoting Ian Lance Taylor <i...@google.com>:
DJ Delorie <d...@redhat.com> writes:
Except that in this case we want to reverse *only* structures that
represent peripherals, *not* other structures.
I'm sorry, that just seems frigging ridiculous.
I can see arguments to have it either way.
At any rate, once you have an attribute, its no big deal for the target
code to set the default for that attribute any way it likes.
I still kind of think this should be a target independent type
attribute. A target hook doesn't seem like the right approach to me.
There is nothing particularly target specific about this concept. I
don't know to map the target specific pragma to a type attribute, but it
must be possible.
Of course, quite a number of ports do this already. E.g.:
config/sh/sh-c.c:sh_pr_intrrupt
config/sh/sh-c.c:sh_add_function_attribute
config/sh/sh.c:sh_insert_attributes
Or for a example that affects data:
config/sol2-c.c:solaris_pragma_align
config/sol2.c:solaris_insert_attributes