<font size=2 face="sans-serif">Hello everyone,</font>
<br>
<br><font size=2 face="sans-serif">currently I'm checking if some functions
are inlined with clang or not. Because of that I have a lot of unused variables
storing return values - but clang optimizes them away including the function.
Even "volatile" didn't stopped Clang from doing so. So I tried
using the GCC attribute "used". But clang just responses:</font>
<br>
<table width=100% style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=100% style="border-style:solid solid solid solid;border-color:#000000;border-width:1px 1px 1px 1px;padding:0px 0px;"><font size=1 face="}">1>main.cpp(9,23):
warning : 'used' attribute ignored [-Wignored-attributes]</font>
<br><font size=1 face="}">1> void*
__attribute__((used)) adr = _ReturnAddress();</font></table>
<br>
<br><font size=2 face="sans-serif">Why is clang doing this? And how can
I prevent him easily from optimizing my values without referencing them?</font>
<br>
<br><font size=2 face="sans-serif">Kind greetings</font>
<br><font size=2 face="sans-serif">Björn<br>
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr.
DE 114 165 789<br>
Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko
Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika<br>
</font>