diff --git a/src/lexer.h b/src/lexer.h index a4fa30f5b8611dc9b539d374fdb47bb46a810ccb..c1de82d4f57fd4619aec9190843d85422781662e 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: lexer.h,v 1.79 2008/06/28 14:44:16 nilsson Exp $ +|| $Id: lexer.h,v 1.80 2008/06/28 15:07:33 nilsson Exp $ */ /* @@ -740,6 +740,10 @@ static int low_yylex(struct lex *lex, YYSTYPE *yylval) { lex->pragmas &= ~ID_NO_DEPRECATION_WARNINGS; } + else + { + yywarning("Unknown #pragma directive."); + } break; } diff --git a/src/testsuite.in b/src/testsuite.in index 658f80c00c9a655b0be82bf11a9a1e101bc879b3..a7d229785ce615229a53ae8c6f4f324dd25a5def 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,5 +1,5 @@ START_MARKER -test_true([["$Id: testsuite.in,v 1.831 2008/06/28 14:44:16 nilsson Exp $"]]); +test_true([["$Id: testsuite.in,v 1.832 2008/06/28 15:07:33 nilsson Exp $"]]); // This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]]) @@ -9069,10 +9069,10 @@ return 0; // #pragma // FIXME: add tests for real pragmas -test_any([[ +test_compile_warning([[ #pragma whatever return 1; -]],1) +]]) test_compile_warning([[ class A {