You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See also #18950 , which I "fixed" by always expanding macros when -fms-extensions is set, because that's what MSVC does.
The problem is that, depending on the pragma, macro expansion may or may not occur. Only the parser knows. And, when we're preprocessing, the parser isn't around to tell us what to expand and what not to. We need to change the layering that the lexer knows how to treat each pragma.
Extended Description
Consider the following C code:
#define PACK_SZ 1
#pragma pack(PACK_SZ)
struct s1 {
char a;
int b;
};
struct s1 myst;
When compiling it without '-save-temps',
the pragma is correctly handled:
When compiling it with '-save-temps', the macro
is not expanded and the pragma is then ignored:
The problem has been reproduced with other pragmas.
The problem is present in CLANG 3.4, but likely in other version as well.
The text was updated successfully, but these errors were encountered: