2

I found several code snippets for disabling GCC optimization for dedicated code parts.

with pragma GCC optimize(0)

But I could not found something like that for Greenhils compiler.

Is there no such option?

Peter
  • 1,629
  • 2
  • 25
  • 45

1 Answers1

6

From the manual:

#pragma ghs Ostring
Turns on optimizations. The optional string may contain any or all of the following letters:
L — Loop optimizations
M — Memory optimizations
S — Small (but Slow) optimizations

#pragma ghs ZO
Disables all optimizations, starting from the next function.
FrodeTennebo
  • 531
  • 3
  • 13
  • Does anybody know if this Pragma also works for static inline functions in Header-Files??? The manual does not say anything about it... – GreenBærg Jan 16 '20 at 11:57