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

Attribute directive ignored for naked procedure in Ada


For arm-eabi with GCC 5.1.0, I write

   procedure Program_Initialization
   with
     Export,
     Convention => Ada,
     External_Name => "program_initialization",
     No_Return;
   pragma Machine_Attribute (Program_Initialization, "naked”);

(because I start the procedure with an assembly statement to set the stack pointer properly)

and the compiler says

   /Users/simon/cortex-gnat-rts/arduino-due/adainclude/startup.adb:19:14: warning: 'noclone' attribute directive ignored [-Wattributes]
   /Users/simon/cortex-gnat-rts/arduino-due/adainclude/startup.adb:19:14: warning: 'noinline' attribute directive ignored [-Wattributes]

which I take to mean that the front-end of the compiler has inserted these attributes in the internal representation before handing off to later phases. I get the same result with “Convention => Asm”.

Is this a bug?

Can I safely use -Wno-attributes here? (it does silence the warning).

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