From efbffc5546810eda09bef509e9c12159c7febf43 Mon Sep 17 00:00:00 2001 From: Anders Magnusson Date: Sun, 7 Oct 2007 07:58:52 +0000 Subject: From master repo: > Don't let pragmas pass through if #ifdef'd away, from Stefan Kempf. --- usr.bin/pcc/cc/cpp/scanner.l | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.bin/pcc/cc/cpp/scanner.l b/usr.bin/pcc/cc/cpp/scanner.l index 5bb0dc51365..94656769f3c 100644 --- a/usr.bin/pcc/cc/cpp/scanner.l +++ b/usr.bin/pcc/cc/cpp/scanner.l @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: scanner.l,v 1.8 2007/09/28 17:59:45 otto Exp $ */ +/* $OpenBSD: scanner.l,v 1.9 2007/10/07 07:58:51 ragge Exp $ */ /* * Copyright (c) 2004 Anders Magnusson. All rights reserved. @@ -804,9 +804,12 @@ pragmastmt(void) slow = 1; if (yylex() != WSPACE) error("bad pragma"); - putstr((usch *)"#pragma "); + if (!flslvl) + putstr((usch *)"#pragma "); do { - putch(c = input()); /* Do arg expansion instead? */ + c = input(); + if (!flslvl) + putch(c); /* Do arg expansion instead? */ } while (c && c != '\n'); ifiles->lineno++; prtline(); -- cgit v1.2.3