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]
Other format: [Raw text]

Re: ARM and __attribute__ long_call error


void pig(void) __attribute__ ((long_call));
void pig(void)
{
}

Yes, that's the way it's currently coded.


The problem, it seems to me, is that we want to fault:

void pig(void) __attribute__ ((long_call));
...
void pig(void);
and


void pig(void);
...
void pig(void) __attribute__((long_call));
both of which would be potentially problematical (which do we believe?)
from the case that you have. AFAICT there is nothing on the types
passed into the back-end to distinguish a declaration from a definition
in this context.

The cases you mention are two declarations right? My example had the attribute on the declaration and not on the definition just like with the other attribute types.
I suppose your explanation went way over my head, since I still don't understand what is different with the long-call attribute that the same approach which works with other function attributes yields an error in this case.
Is there anything tricky that prevents an easy implementation?


thanks
Jani


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