This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Scope of #pragma

If I declare:

#pragma optimize(0)
void func1(void)
...

void func2(void)
...

void func3(void)
...

Does this apply only for func1 or for all subsequent functions (i.e. func2,func3,etc)?

Thanks,

Chip Burns

  • See the note at the start of the "Control Directives" section in Chapter 2 of the Manual:

    "Typically, each control directive may be specified only once at the beginning of a source file. If a directive is specified more than once, the compiler generates a fatal error and aborts compilation. Directives that may be specified more than once are so noted in the following sections."