[Mesa-dev] [Bug 75336] New: Don't provide inline definitions of functions available in MSVS 2013's standard library

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 21 11:22:13 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=75336

          Priority: medium
            Bug ID: 75336
          Assignee: mesa-dev at lists.freedesktop.org
           Summary: Don't provide inline definitions of functions
                    available in MSVS 2013's standard library
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: hans at chromium.org
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: Other
           Product: Mesa

MSVS 2013 provides functions that were previously not available in the standard
library. Mesa provides inline definitions for these when _MSC_VER is set. For
example,
http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/main/imports.h#n136

Clang warns about this "non-static declaration followed by static declaration"
situation:

..\..\third_party\mesa\src\src\mesa\main/imports.h(148,20) :  warning(clang):
static declaration of 'truncf' follows non-static declaration
static inline float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
                    ^
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(597,22) :
 note(clang): previous declaration is here
_CRTIMP float __cdecl truncf(_In_ float _X);
                      ^

These declarations should probably be guarded by #if _MSC_VER < 1800.

(Chromium worked around the warning here:
http://src.chromium.org/viewvc/chrome?revision=252594&view=revision)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140221/b396d523/attachment.html>


More information about the mesa-dev mailing list