diff options
author | pfg <pfg@FreeBSD.org> | 2014-01-12 21:16:26 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-01-12 21:16:26 +0000 |
commit | f630f6f40f740cb8f2ee6f8b7ca4b87afe4549ed (patch) | |
tree | 1583542d675d7245df1abbe37fe4624d8013d8b1 /contrib/gcclibs/libcpp/lex.c | |
parent | d54137712a89d020593dfb73ef2e0814051f5387 (diff) | |
download | FreeBSD-src-f630f6f40f740cb8f2ee6f8b7ca4b87afe4549ed.zip FreeBSD-src-f630f6f40f740cb8f2ee6f8b7ca4b87afe4549ed.tar.gz |
MFC r260310:
libcpp: misc fixes from Apple's GCC.
Fixes some bugs detected by Apple:
#error with unmatched quotes
pragma mark
Obtained from: Apple GCC 4.2 - 5553
Diffstat (limited to 'contrib/gcclibs/libcpp/lex.c')
-rw-r--r-- | contrib/gcclibs/libcpp/lex.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/gcclibs/libcpp/lex.c b/contrib/gcclibs/libcpp/lex.c index 1a3cad7..dfc432e 100644 --- a/contrib/gcclibs/libcpp/lex.c +++ b/contrib/gcclibs/libcpp/lex.c @@ -658,7 +658,12 @@ lex_string (cpp_reader *pfile, cpp_token *token, const uchar *base) cpp_error (pfile, CPP_DL_WARNING, "null character(s) preserved in literal"); - if (type == CPP_OTHER && CPP_OPTION (pfile, lang) != CLK_ASM) + /* APPLE LOCAL begin #error with unmatched quotes 5607574 */ + if (type == CPP_OTHER + && CPP_OPTION (pfile, lang) != CLK_ASM + && !pfile->state.in_diagnostic + && !pfile->state.skipping) + /* APPLE LOCAL end #error with unmatched quotes 5607574 */ cpp_error (pfile, CPP_DL_PEDWARN, "missing terminating %c character", (int) terminator); |