Hi C experts,
In my code I have got
#pragma extern_prefix (push, "");
Some extern function declarations
#pragma extern_prefix (pop, "");
So that compiler does not prepend anything to those extern functions , I get an error

error #14: extra text after expected end of preprocessing directive

Does anyone know how to fix this syntax error ?

What C compiler are you using? What's this pragma format description in the compiler manuals?

Hi C experts,
In my code I have got
#pragma extern_prefix (push, "");
Some extern function declarations
#pragma extern_prefix (pop, "");
So that compiler does not prepend anything to those extern functions , I get an error

error #14: extra text after expected end of preprocessing directive

Does anyone know how to fix this syntax error ?

I may be wrong but if this pragma is acting as preprocessor directive then it should not have any ";" at its end. Right?
(Even the error coming is also showing that...)

A semicolon can be useful in some preprocessor commands (probably some bizarre scenario), for example its perfectly valid in a #define statement. In this case we do need to know the compiler and its definition of #pragma because its functionality is not standard.

#pragma extern_prefix (push, "")
#pragma extern_prefix (pop) worked , marking it as solved.

A semicolon can be useful in some preprocessor commands (probably some bizarre scenario), for example its perfectly valid in a #define statement. In this case we do need to know the compiler and its definition of #pragma because its functionality is not standard.

Well according to my knowledge semicolons are not used in any of the preprocessor directives because of the fact that preprocessor directives are mostly used within the coding statements and the appearance of ";" would mark the end of that statement.

This question has already been answered. Start a new discussion instead.