* Attribute directive ignored for naked procedure in Ada
@ 2015-07-22 10:51 Simon Wright
0 siblings, 0 replies; only message in thread
From: Simon Wright @ 2015-07-22 10:51 UTC (permalink / raw)
To: gcc-help
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).
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-22 10:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-22 10:51 Attribute directive ignored for naked procedure in Ada Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).