1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-24 11:31:31 +00:00

Added warning on concatenated string literals in _Pragma operations.

This commit is contained in:
acqn 2023-10-13 14:54:54 +08:00
parent 25832ef5fc
commit 7b0d1d9679

View File

@ -1157,6 +1157,11 @@ void NextToken (void)
/* Check for string concatenation */ /* Check for string concatenation */
if (CurTok.Tok == TOK_SCONST || CurTok.Tok == TOK_WCSCONST) { if (CurTok.Tok == TOK_SCONST || CurTok.Tok == TOK_WCSCONST) {
if (PrevTok.Tok == TOK_SCONST || PrevTok.Tok == TOK_WCSCONST) { if (PrevTok.Tok == TOK_SCONST || PrevTok.Tok == TOK_WCSCONST) {
/* Warn on non-ISO behavior */
if (InPragmaParser) {
Warning ("Concatenated string literals in _Pragma operation");
}
/* Concatenate strings */ /* Concatenate strings */
ConcatLiteral (PrevTok.SVal, CurTok.SVal); ConcatLiteral (PrevTok.SVal, CurTok.SVal);