[Mesa-dev] [Bug 91591] rounding.h:102:2: error: #error "Unsupported or undefined LONG_BIT"

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Aug 9 13:27:38 PDT 2015


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

Jose Fonseca <jfonseca at vmware.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|mesa-dev at lists.freedesktop. |mattst88 at gmail.com
                   |org                         |

--- Comment #2 from Jose Fonseca <jfonseca at vmware.com> ---
My change only makes an existing bug surface.

Even without my change I believe the warning 

  rounding.h:107:1: warning: no return statement in function returning non-void
[-Wreturn-type]

was probably there, ever since Matt's commit
http://cgit.freedesktop.org/mesa/mesa/commit/?id=680de24545d23d0c2b699020267ca484f81a04a9
.  But because it was not fatal, it was easy to miss.



As I said to Matt on mesa-dev ML, it sounds like LONG_BIT is not standard. 
MinGW/MSVC at least don't define it.  It looks like not all Linux define it
neither. 

There was a discussion about on Stack Overflow, but is not very conclusive.


On my system, LONG_BIT is defined in 

  /usr/include/x86_64-linux-gnu/bits/xopen_lim.h

And /usr/include/limits.h includes it, but not unconditionally:

  #ifdef    __USE_XOPEN
  # include <bits/xopen_lim.h>
  #endif

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


More information about the mesa-dev mailing list