<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>164973</bug_id>
          
          <creation_ts>2016-11-18 17:20:25 -0800</creation_ts>
          <short_desc>Disable #line markers in bison output on Windows</short_desc>
          <delta_ts>2016-11-21 17:57:42 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Konstantin Tokarev">annulen</reporter>
          <assigned_to name="Konstantin Tokarev">annulen</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>darin</cc>
    
    <cc>pvollan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1252972</commentid>
    <comment_count>0</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2016-11-18 17:20:25 -0800</bug_when>
    <thetext>New bison versions since 3.0 have bug that causes unescaped paths to be printed in #line directives. On Windows CMake passes absolute paths to bison that have backslashes in them, leading to compiler errors or warnings because of unrecognized escape sequences.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252973</commentid>
    <comment_count>1</comment_count>
      <attachid>295229</attachid>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2016-11-18 17:22:15 -0800</bug_when>
    <thetext>Created attachment 295229
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1253251</commentid>
    <comment_count>2</comment_count>
      <attachid>295229</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2016-11-21 09:14:12 -0800</bug_when>
    <thetext>Comment on attachment 295229
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=295229&amp;action=review

&gt; Source/WebCore/css/makegrammar.pl:83
&gt; -system(&quot;\&quot;$bison\&quot; -d -p $symbolsPrefix $grammarFilePath -o $fileBase.cpp&quot;);
&gt; +
&gt; +my $extraArg = &quot;&quot;;
&gt; +if ($^O eq &quot;MSWin32&quot;) {
&gt; +    $extraArg = &quot;--no-lines&quot;;
&gt; +}
&gt; +system(&quot;\&quot;$bison\&quot; $extraArg -d -p $symbolsPrefix $grammarFilePath -o $fileBase.cpp&quot;);

Here&apos;s how I would write it:

    my @noLines = ();
    push @noLines, &quot;--no-lines&quot; if $^O eq &quot;MSWin32&quot;; # Work around bug in bison &gt;= 3.0 on Windows where it puts backslashes into #line directives.
    system($bison, @noLines, &quot;-d&quot;, &quot;-p&quot;, $symbolsPrefix, $grammarFilePath, &quot;-o&quot;, &quot;$fileBase.cpp&quot;) == 0 or die;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1253256</commentid>
    <comment_count>3</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2016-11-21 09:39:59 -0800</bug_when>
    <thetext>What about 

  my @bisonCmd = ($bison, &quot;-d&quot;, &quot;-p&quot;, $symbolsPrefix, $grammarFilePath, &quot;-o&quot;, $fileBase.cpp);
  push @bisonCmd, &quot;--no-lines&quot; if $^O eq &quot;MSWin32&quot;; # Work around bug in bison &gt;= 3.0 on Windows where it puts backslashes into #line directives.
  system(@bisonCmd) == 0 or die;

?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1253257</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2016-11-21 09:42:16 -0800</bug_when>
    <thetext>That seems fine. I would name it @bisonCommand, without abbreviating the word, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1253258</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2016-11-21 09:43:00 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt;   my @bisonCmd = ($bison, &quot;-d&quot;, &quot;-p&quot;, $symbolsPrefix, $grammarFilePath,
&gt; &quot;-o&quot;, $fileBase.cpp);

Need quotes around &quot;$fileBase.cpp&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1253309</commentid>
    <comment_count>6</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2016-11-21 17:57:42 -0800</bug_when>
    <thetext>Committed r208954: &lt;http://trac.webkit.org/changeset/208954&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>295229</attachid>
            <date>2016-11-18 17:22:15 -0800</date>
            <delta_ts>2016-11-21 09:14:12 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-164973-20161119042207.patch</filename>
            <type>text/plain</type>
            <size>1617</size>
            <attacher name="Konstantin Tokarev">annulen</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjA4OTExCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMmRmYjcwNDMxNmNkNjdl
Mjg0ODY0MzE1M2JmNTBhZTk0YmQ0NGU3OS4uNTYyZDkzYjEzZjBhYmFjNDVkODI4YmYyYjI0NjIz
YzBmNTY4NmJmZSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE5IEBACisyMDE2LTExL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WJmNWQzYmVm
NmU1ZmFiNDQzY2VjNjMzNWM0MzlhZGIzNjhmYTcgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJDb3Jl
L2Nzcy9tYWtlZ3JhbW1hci5wbAorKysgYi9Tb3VyY2UvV2ViQ29yZS9jc3MvbWFrZWdyYW1tYXIu
cGwKQEAgLTc1LDcgKzc1LDEyIEBAIGlmICgkc3VmZml4IGVxICIueS5pbiIpIHsKIH0KIAogbXkg
JGZpbGVCYXNlID0gRmlsZTo6U3BlYy0+am9pbigkb3V0cHV0RGlyLCAkZmlsZW5hbWUpOwotc3lz
dGVtKCJcIiRiaXNvblwiIC1kIC1wICRzeW1ib2xzUHJlZml4ICRncmFtbWFyRmlsZVBhdGggLW8g
JGZpbGVCYXNlLmNwcCIpOworCitteSAkZXh0cmFBcmcgPSAiIjsKK2lmICgkXk8gZXEgIk1TV2lu
MzIiKSB7CisgICAgJGV4dHJhQXJnID0gIi0tbm8tbGluZXMiOworfQorc3lzdGVtKCJcIiRiaXNv
blwiICRleHRyYUFyZyAtZCAtcCAkc3ltYm9sc1ByZWZpeCAkZ3JhbW1hckZpbGVQYXRoIC1vICRm
aWxlQmFzZS5jcHAiKTsKIAogb3BlbiBIRUFERVIsICI+JGZpbGVCYXNlLmgiIG9yIGRpZTsKIHBy
aW50IEhFQURFUiA8PCAiRU9GIjsK
</data>
<flag name="review"
          id="317844"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>