aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1999-09-23 20:28:40 +0000
committerJason Merrill <jason@gcc.gnu.org>1999-09-23 16:28:40 -0400
commite6ad5e90440d3ea6ef4af3e5eef826a47de18444 (patch)
tree269dc45aad402861e24a22411bffe495b561f3fb /gcc/cpplib.c
parentd18039511137c58d9ba3818c78d5d6713190dd1d (diff)
downloadgcc-e6ad5e90440d3ea6ef4af3e5eef826a47de18444.zip
gcc-e6ad5e90440d3ea6ef4af3e5eef826a47de18444.tar.gz
gcc-e6ad5e90440d3ea6ef4af3e5eef826a47de18444.tar.bz2
cpplib.c (handle_directive): Don't complain about `# NUMBER' if we're seeing this input for a second time.
* cpplib.c (handle_directive): Don't complain about `# NUMBER' if we're seeing this input for a second time. From-SVN: r29634
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index b315186..80f02de 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -528,8 +528,12 @@ handle_directive (pfile)
c = PEEKC ();
if (c >= '0' && c <= '9')
{
- /* Handle # followed by a line number. */
- if (CPP_PEDANTIC (pfile))
+ /* Handle # followed by a line number. Complain about using that
+ form if we're being pedantic, but not if this is regurgitated
+ input (preprocessed or fed back in by the C++ frontend). */
+ if (CPP_PEDANTIC (pfile)
+ && ! CPP_PREPROCESSED (pfile)
+ && ! CPP_BUFFER (pfile)->manual_pop)
cpp_pedwarn (pfile, "`#' followed by integer");
do_line (pfile, NULL);
return 1;