summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pidl/idl.yp4
-rw-r--r--pidl/lib/Parse/Pidl/IDL.pm4
2 files changed, 6 insertions, 2 deletions
diff --git a/pidl/idl.yp b/pidl/idl.yp
index b5c5185fbe..c8a65f6f62 100644
--- a/pidl/idl.yp
+++ b/pidl/idl.yp
@@ -610,7 +610,9 @@ again:
for ($parser->YYData->{INPUT}) {
if (/^\#/) {
- if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
+ # Linemarker format is described at
+ # http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
+ if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) {
$parser->YYData->{LINE} = $1-1;
$parser->YYData->{FILE} = $2;
goto again;
diff --git a/pidl/lib/Parse/Pidl/IDL.pm b/pidl/lib/Parse/Pidl/IDL.pm
index d4820ffe92..6927c89255 100644
--- a/pidl/lib/Parse/Pidl/IDL.pm
+++ b/pidl/lib/Parse/Pidl/IDL.pm
@@ -2576,7 +2576,9 @@ again:
for ($parser->YYData->{INPUT}) {
if (/^\#/) {
- if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
+ # Linemarker format is described at
+ # http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
+ if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) {
$parser->YYData->{LINE} = $1-1;
$parser->YYData->{FILE} = $2;
goto again;