bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inttypes.h compile error


From: Eric Blake
Subject: Re: inttypes.h compile error
Date: Thu, 15 Dec 2011 08:09:36 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

On 12/15/2011 05:50 AM, Alexander V. Lukyanov wrote:
> I get this message in a C++ program on linux (glibc-2.14).
> 
> ../lib/inttypes.h:58:3: error: #error "This file assumes that 'int' has 
> exactly 32 bits. Please report your platform and compiler to 
> <address@hidden>."
> 
> I think it's because of this in /usr/include/stdint.h:
> 
> /* The ISO C99 standard specifies that in C++ implementations these
>    macros should only be defined if explicitly requested.  */

ISO C99 is not the C++ spec, and C++11 specifically states that
__STDC_LIMIT_MACROS is not required.  You are probably running into
fallout from our recent patches to make things available on C++
regardless of whether glibc followed the C++11 recommendations:

https://lists.gnu.org/archive/html/bug-gnulib/2011-12/msg00085.html

Are you sure you are using the latest gnulib sources, and that your
program included <config.h> first?  Can you provide the actual test case
you used to provoke the compilation failure?

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]