This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Attribute directive ignored for naked procedure in Ada
- From: Simon Wright <simon at pushface dot org>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 22 Jul 2015 11:52:13 +0100
- Subject: Attribute directive ignored for naked procedure in Ada
- Authentication-results: sourceware.org; auth=none
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).