disable escape sequences for #line and #error
This commit is contained in:
parent
f333272eb5
commit
13444545a9
5 changed files with 10 additions and 4 deletions
|
|
@ -722,7 +722,9 @@ int TPpContext::CPPline(TPpToken* ppToken)
|
|||
const char* sourceName = nullptr; // Optional source file name.
|
||||
bool lineErr = false;
|
||||
bool fileErr = false;
|
||||
disableEscapeSequences = true;
|
||||
token = eval(token, MIN_PRECEDENCE, false, lineRes, lineErr, ppToken);
|
||||
disableEscapeSequences = false;
|
||||
if (! lineErr) {
|
||||
lineToken = lineRes;
|
||||
if (token == '\n')
|
||||
|
|
@ -765,7 +767,9 @@ int TPpContext::CPPline(TPpToken* ppToken)
|
|||
// Handle #error
|
||||
int TPpContext::CPPerror(TPpToken* ppToken)
|
||||
{
|
||||
disableEscapeSequences = true;
|
||||
int token = scanToken(ppToken);
|
||||
disableEscapeSequences = false;
|
||||
std::string message;
|
||||
TSourceLoc loc = ppToken->loc;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue