<?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>88721</bug_id>
          
          <creation_ts>2012-06-09 18:23:46 -0700</creation_ts>
          <short_desc>Compile error: &apos;bool std::isinf(float)&apos; is not &apos;constexpr&apos; with GCC 4.6 in C++11 mode</short_desc>
          <delta_ts>2012-06-21 06:26:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Floris Bos">bos</reporter>
          <assigned_to name="Balazs Kelemen">kbalazs</assigned_to>
          <cc>allan.jensen</cc>
    
    <cc>ap</cc>
    
    <cc>kbalazs</cc>
    
    <cc>ossy</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>645439</commentid>
    <comment_count>0</comment_count>
    <who name="Floris Bos">bos</who>
    <bug_when>2012-06-09 18:23:46 -0700</bug_when>
    <thetext>Compile error:

==
[...]/WebKit-r119255/Source/WTF/wtf/MathExtras.h: In function &apos;bool std::wtf_isinf(float)&apos;:
[...]/WebKit-r119255/Source/WTF/wtf/MathExtras.h:292:63: error: &apos;bool std::isinf(float)&apos; is not &apos;constexpr&apos;
[...]/WebKit-r119255/Source/WTF/wtf/MathExtras.h: In function &apos;bool std::wtf_isinf(double)&apos;:
[...]/WebKit-r119255/Source/WTF/wtf/MathExtras.h:293:64: error: &apos;bool std::isinf(double)&apos; is not &apos;constexpr&apos;
[...]/WebKit-r119255/Source/WTF/wtf/MathExtras.h: In function &apos;bool std::wtf_isnan(float)&apos;:
[...]/WebKit-r119255/Source/WTF/wtf/MathExtras.h:294:63: error: &apos;bool std::isnan(float)&apos; is not &apos;constexpr&apos;
[...]/WebKit-r119255/Source/WTF/wtf/MathExtras.h: In function &apos;bool std::wtf_isnan(double)&apos;:
[...]/WebKit-r119255/Source/WTF/wtf/MathExtras.h:295:64: error: &apos;bool std::isnan(double)&apos; is not &apos;constexpr&apos;
==


Concerns the following code:

==
#if COMPILER_QUIRK(GCC11_GLOBAL_ISINF_ISNAN)
// A workaround to avoid conflicting declarations of isinf and isnan when compiling with GCC in C++11 mode.
namespace std {
    constexpr bool wtf_isinf(float f) { return std::isinf(f); }
    constexpr bool wtf_isinf(double d) { return std::isinf(d); }
    constexpr bool wtf_isnan(float f) { return std::isnan(f); }
    constexpr bool wtf_isnan(double d) { return std::isnan(d); }
};

using std::wtf_isinf;
using std::wtf_isnan;

#define isinf(x) wtf_isinf(x)
#define isnan(x) wtf_isnan(x)
#endif
==

Seems that with the gcc 4.6.3 the function std::isinf() is not marked constexpr, so wtf_isinf() may not be that either.
After replacing &quot;constexpr&quot; with &quot;inline&quot; it does compile.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>646708</commentid>
    <comment_count>1</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2012-06-12 00:55:09 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; Seems that with the gcc 4.6.3 the function std::isinf() is not marked constexpr, so wtf_isinf() may not be that either.
&gt; After replacing &quot;constexpr&quot; with &quot;inline&quot; it does compile.

Ah, interesting. It should be harmless to replace constexpr with inline for gcc 4.7 as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>646709</commentid>
    <comment_count>2</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2012-06-12 00:58:44 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; (In reply to comment #0)
&gt; &gt; Seems that with the gcc 4.6.3 the function std::isinf() is not marked constexpr, so wtf_isinf() may not be that either.
&gt; &gt; After replacing &quot;constexpr&quot; with &quot;inline&quot; it does compile.
&gt; 
&gt; Ah, interesting. It should be harmless to replace constexpr with inline for gcc 4.7 as well.

I wouldn&apos;t call it regression though. C++11 mode was not work</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>652586</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-06-19 10:45:03 -0700</bug_when>
    <thetext>*** Bug 89463 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>653322</commentid>
    <comment_count>4</comment_count>
      <attachid>148531</attachid>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-20 03:28:00 -0700</bug_when>
    <thetext>Created attachment 148531
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>653325</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-06-20 03:31:20 -0700</bug_when>
    <thetext>Attachment 148531 did not pass style-queue:

Failed to run &quot;[&apos;Tools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;Source/WTF/ChangeLog&apos;, u&apos;Source/WTF/wtf/Ma...&quot; exit_code: 1
Source/WTF/wtf/MathExtras.h:285:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Source/WTF/wtf/MathExtras.h:285:  wtf_isinf is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming] [4]
Source/WTF/wtf/MathExtras.h:286:  wtf_isinf is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming] [4]
Source/WTF/wtf/MathExtras.h:287:  wtf_isnan is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming] [4]
Source/WTF/wtf/MathExtras.h:288:  wtf_isnan is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 5 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>653331</commentid>
    <comment_count>6</comment_count>
      <attachid>148531</attachid>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2012-06-20 03:41:59 -0700</bug_when>
    <thetext>Comment on attachment 148531
Patch

LGTM</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>654428</commentid>
    <comment_count>7</comment_count>
      <attachid>148531</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-06-21 06:06:14 -0700</bug_when>
    <thetext>Comment on attachment 148531
Patch

LGTM, r=me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>654438</commentid>
    <comment_count>8</comment_count>
      <attachid>148531</attachid>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-21 06:26:53 -0700</bug_when>
    <thetext>Comment on attachment 148531
Patch

Clearing flags on attachment: 148531

Committed r120922: &lt;http://trac.webkit.org/changeset/120922&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>654439</commentid>
    <comment_count>9</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-21 06:26:59 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>148531</attachid>
            <date>2012-06-20 03:28:00 -0700</date>
            <delta_ts>2012-06-21 06:26:52 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-88721-20120620122756.patch</filename>
            <type>text/plain</type>
            <size>1776</size>
            <attacher name="Balazs Kelemen">kbalazs</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZX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