[gobject-introspection] Silently skip #pragma directives when scanning sources.
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Silently skip #pragma directives when scanning sources.
- Date: Sun, 3 Oct 2010 13:04:09 +0000 (UTC)
commit 170fed201a406395392217928c9fe0caa9c5921e
Author: Pavel Holejsovsky <pavel holejsovsky gmail com>
Date: Thu Sep 30 11:38:55 2010 +0200
Silently skip #pragma directives when scanning sources.
This is useful e.g. on cygwin, where system headers use #pragma directives,
causing annoying false-alarm errors during every g-ir-scanner run.
https://bugzilla.gnome.org/show_bug.cgi?id=630994
giscanner/scannerlexer.l | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index 5b68ca0..e06bc85 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -78,6 +78,7 @@ stringtext ([^\\\"])|(\\.)
"#define "[a-zA-Z_][a-zA-Z_0-9]*"(" { yyless (yyleng - 1); return FUNCTION_MACRO; }
"#define "[a-zA-Z_][a-zA-Z_0-9]* { return OBJECT_MACRO; }
+"#pragma ".*"\n" { /* Ignore pragma. */ }
"# "[0-9]+" ".*"\n" { process_linemarks(scanner); }
"#" { }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]