lpcware

Problem with #pragma

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by micrio on Fri Mar 12 11:13:41 MST 2010
[SIZE=4]I want to debug a piece of code that has many timing constraints. I would like to optimize specific functions but leave others not optimized while I debug it.[/SIZE]

[SIZE=4]It seems [B][COLOR=#7f0055][COLOR=#7f0055]#pragma[/COLOR][/COLOR][/B] GCC option ([COLOR=#2a00ff][COLOR=#2a00ff]"-O3"[/COLOR][/COLOR]) would be perfect for this. However the compiler gives this warning;[/SIZE]

[SIZE=2][SIZE=2][SIZE=4]warning: ignoring #pragma GCC optimize[/SIZE]

[SIZE=4]In fact any #pragma gets ignored. What am I doing wrong?[/SIZE]

[SIZE=4]Thanks,[/SIZE]
[SIZE=4]Pete.[/SIZE]
[/SIZE][/SIZE]

Outcomes