diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-05-04 16:21:29 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-05-04 16:21:29 +0000 |
commit | 57c578a6bfed5ffa4da16984b9f92a41d5bd68cb (patch) | |
tree | 54a0badd8c16d499639fe79565ba47c91ae1a822 /gcc/cpplex.c | |
parent | 4e95db71c294f64af199bc6feaca0e3a1923106e (diff) | |
download | gcc-57c578a6bfed5ffa4da16984b9f92a41d5bd68cb.zip gcc-57c578a6bfed5ffa4da16984b9f92a41d5bd68cb.tar.gz gcc-57c578a6bfed5ffa4da16984b9f92a41d5bd68cb.tar.bz2 |
cpphash.h: #define __extension__ away if GCC_VERSION < 2095 (overly conservative).
* cpphash.h: #define __extension__ away if GCC_VERSION < 2095
(overly conservative). Change extern inline wrappers to
static inline, define them always, use PARAMS properly.
* cpplex.c (_cpp_get_directive_token): Don't issue pedantic
whitespace warnings for \f and \v at the beginning of a line.
From-SVN: r33674
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 9e068a3..78df852 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -1641,8 +1641,10 @@ _cpp_get_directive_token (pfile) { long old_written; enum cpp_ttype token; + int at_bol; get_next: + at_bol = (CPP_BUFFER (pfile)->cur == CPP_BUFFER (pfile)->line_base); old_written = CPP_WRITTEN (pfile); token = _cpp_lex_token (pfile); switch (token) @@ -1657,7 +1659,9 @@ _cpp_get_directive_token (pfile) return CPP_VSPACE; case CPP_HSPACE: - if (CPP_PEDANTIC (pfile)) + /* The purpose of this rather strange check is to prevent pedantic + warnings for ^L in an #ifdefed out block. */ + if (CPP_PEDANTIC (pfile) && ! at_bol) pedantic_whitespace (pfile, pfile->token_buffer + old_written, CPP_WRITTEN (pfile) - old_written); CPP_SET_WRITTEN (pfile, old_written); |