This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Functions using attribute `noreturn'...
- To: gcc-help at gcc dot gnu dot org
- Subject: Functions using attribute `noreturn'...
- From: pmw at uk dot research dot att dot com (Paul Webster)
- Date: Wed, 2 Feb 2000 17:07:52 GMT
I'm currently in the process of porting GCC and am trying to optimise my code
for function prologues and epilogues.
To minimise the amount of code output, I would like to check to see if the
current function is declared with the __noreturn__ attribute. If it is, then
I don't need to do output any of the function return code or save/restore any
registers that otherwise would be.
Is there any way I can find out whether the current function has been declared
with this attribute? (Similarly, for other attributes, such as interrupt). This
would be in the C support code, not in the machine description (.md) file. Is
there a GCC support routine I can call, or is it more involved?
Thanks in advance for any help.
Paul
==============================================================================
AT&T Laboratories Cambridge
------------------------------------------------------------------------------
Dr. Paul Webster, 24a Trumpington Street, Cambridge, CB2 1QA, England.
Tel: +44 (0)1223 343 218 Fax: +44 (0)1223 313542
==============================================================================