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

Functions using attribute `noreturn'...



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
==============================================================================

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