<?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>151621</bug_id>
          
          <creation_ts>2015-11-26 05:45:11 -0800</creation_ts>
          <short_desc>Use mark pragmas only if it is supported</short_desc>
          <delta_ts>2015-12-14 04:56:13 -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>JavaScriptCore</component>
          <version>Other</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>
          
          <blocked>152248</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Csaba Osztrogonác">ossy</assigned_to>
          <cc>ap</cc>
    
    <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>ossy</cc>
    
    <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1144496</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-11-26 05:45:11 -0800</bug_when>
    <thetext>build log:
-----------
../../Source/JavaScriptCore/b3/air/AirIteratedRegisterCoalescing.cpp:687:0: error: ignoring #pragma mark  [-Werror=unknown-pragmas]
../../Source/JavaScriptCore/b3/air/AirIteratedRegisterCoalescing.cpp:721:0: error: ignoring #pragma mark  [-Werror=unknown-pragmas]

mark pragma is an OS X only feature, we shouldn&apos;t use them unconditionally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144500</commentid>
    <comment_count>1</comment_count>
      <attachid>266182</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-11-26 06:01:26 -0800</bug_when>
    <thetext>Created attachment 266182
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144508</commentid>
    <comment_count>2</comment_count>
      <attachid>266182</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-11-26 06:45:39 -0800</bug_when>
    <thetext>Comment on attachment 266182
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144518</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-11-26 07:30:42 -0800</bug_when>
    <thetext>What does Cocoa have to do with pragmas? Is this how we usually conditionalize these?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144519</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-11-26 08:14:37 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; What does Cocoa have to do with pragmas? 
This pragma is for Xcode, that&apos;s why GCC 
on Linux doesn&apos;t know what to with it.

http://iosdevelopertips.com/xcode/xcode-and-pragma-mark.html

&gt; Is this how we usually conditionalize these?
It is the first and only occurence of this pragma in platform independent code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144520</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-11-26 08:16:53 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; What does Cocoa have to do with pragmas? Is this how we usually
&gt; conditionalize these?

&quot;#if PLATFORM(COCOA)&quot; here is more like a pseudonym for &quot;#if PLATFORM(MAC) || PLATFORM(IOS)&quot;.  The pragma appears to only be supported by Xcode, and hence maybe by Clang in general?  I would have suggested &quot;#if COMPILER(CLANG)&quot; except I&apos;m not sure if Clang on linux also supports this pragma.

Ossy, can you try &quot;#if COMPILER(CLANG)&quot; and then building on linux with Clang?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144526</commentid>
    <comment_count>6</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-11-26 08:59:04 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #3)
&gt; &gt; What does Cocoa have to do with pragmas? Is this how we usually
&gt; &gt; conditionalize these?
&gt; 
&gt; &quot;#if PLATFORM(COCOA)&quot; here is more like a pseudonym for &quot;#if PLATFORM(MAC)
&gt; || PLATFORM(IOS)&quot;.  The pragma appears to only be supported by Xcode, and
&gt; hence maybe by Clang in general?  I would have suggested &quot;#if
&gt; COMPILER(CLANG)&quot; except I&apos;m not sure if Clang on linux also supports this
&gt; pragma.
&gt; 
&gt; Ossy, can you try &quot;#if COMPILER(CLANG)&quot; and then building on linux with
&gt; Clang?

Using COMPILER(CLANG) instead of PLATFORM(COCOA) would be very confusing.

As far as I know &quot;#pragma mark&quot; is useful for 
only Xcode users which is same as PLATFORM(COCOA)
( == #if PLATFORM(MAC) || PLATFORM(IOS) ).

I checked, Clang simply ignores this pragma on Linux too since an Apple
employee hacked it into Clang - https://github.com/llvm-mirror/clang/commit/2243449253475574fc6f14986ff8f7fce5d46799 .

Not to mention that pragmas are compiler directives 
originally, but Apple uses it for other purposes ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144578</commentid>
    <comment_count>7</comment_count>
      <attachid>266182</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-11-27 05:02:04 -0800</bug_when>
    <thetext>Comment on attachment 266182
Patch

Clearing flags on attachment: 266182

Committed r192778: &lt;http://trac.webkit.org/changeset/192778&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144579</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-11-27 05:02:09 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144608</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-11-27 14:03:29 -0800</bug_when>
    <thetext>A less misleading way to deal with this is to use #if 0 and #endif around the pragma.

Alternatively, this style of comment is also recognized by Xcode: &quot;// MARK: ...&quot; The downside is that &quot;MARK: &quot; is also displayed in Xcode&apos;s function name menu then.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>266182</attachid>
            <date>2015-11-26 06:01:26 -0800</date>
            <delta_ts>2015-11-27 05:02:04 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-151621-20151126150108.patch</filename>
            <type>text/plain</type>
            <size>1550</size>
            <attacher name="Csaba Osztrogonác">ossy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTkyNzcyCmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCA2
NDRkNzZiNzBkZjdhNGIyN2Q0YmI4OTVhYTg1ZTM5NWE5MWE3MDNlLi42MDU5MmZjOWE5NzJmMmRj
MjQzMTdhMDI0MjMwNzZlMjM1OTM5ZDBiIDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxMiBAQAorMjAxNS0xMS0yNiAgQ3NhYmEgT3N6dHJvZ29uw6FjICA8b3NzeUB3ZWJraXQu
b3JnPgorCisgICAgICAgIFVzZSBtYXJrIHByYWdtYX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