Boost logo

Boost :

Subject: Re: [boost] Closed for major changes; release freeze approaching
From: Daniel James (daniel_james_at_[hidden])
Date: 2010-01-09 09:26:51


2010/1/6 John Maddock <john_at_[hidden]>:
>
> Looks like gcc on Darwin is producing warnings from cstdint.hpp that regular
> gcc on Linux doesn't - I thought I had all those warnings quashed as well
> :-(
>
> Any Darwin developers got any ideas?

I think it's a bug in the gcc 4.0 library, not a darwin bug (it
doesn't happen in darwin 4.2). This is what happens:

#include <vector>
// In cstdint.hpp:
#define __STDC_CONSTANT_MACROS
#include <stdint.h>

'vector' includes 'stdint.h' before __STDC_CONSTANT_MACROS is defined,
so the macro has no effect and the integer constant macros (INT8_C
etc) aren't defined. So boost's version is used which causes the
warning.

The easy workaround is to define the system header pragma immediately
before the warning is generated (patch attached). Technically, there's
an ODR violation since INT8_C can be defined differently in different
units, but I don't think that's a real problem.

Daniel




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk