[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib bugs on OSX & C++
From: |
Jarno Rajahalme |
Subject: |
Re: gnulib bugs on OSX & C++ |
Date: |
Thu, 15 Apr 2010 13:07:29 -0700 |
Maybe the attachment was too long for the list, let me know if I need to send
it again.
Jarno
On Apr 15, 2010, at 12:57 PM, Jarno Rajahalme wrote:
> Bruno,
>
> These warnings only show with -O, so this is related to optimization. I saw
> the comment in the definition of the macros relating to not using const to
> get rid of these warnings when optimizing, but that does not seem to work as
> expected.
>
> I have included the preprocessed output (main.cpp).
>
> Compiled with:
> g++-mp-4.4 -DHAVE_CONFIG_H -I.. -I../lib -O1 -E -dD -c -o main.cpp main.cc
>
> Jarno
>
> <main.cpp>
>
> On Apr 10, 2010, at 2:42 AM, ext Bruno Haible wrote:
>
>> Jarno Rajahalme wrote:
>>> main.cc:9: warning: call to 'strndup' declared with attribute warning: The
>>> symbol ::strndup refers to the system function. Use gnulib::strndup instead.
>>> main.cc:12: warning: call to 'close' declared with attribute warning: The
>>> symbol ::close refers to the system function. Use gnulib::close instead.
>>
>> I don't understand the origin of these warnings. _GL_CXXALIAS_SYS is defined
>> in a way as to avoid these warnings. Can you show the relevant preprocessed
>> output?
>> $ g++-mp-4.4 -DHAVE_CONFIG_H -I. -I.. -I../lib -g -O2 main.cc -E | grep
>> strndup
>> $ g++-mp-4.4 -DHAVE_CONFIG_H -I. -I.. -I../lib -g -O2 main.cc -E | grep
>> close
>>
>> Bruno
>
- Re: gnulib bugs on OSX & C++, (continued)
Re: strnlen on OSX & C++, Bruno Haible, 2010/04/10
Re: gnulib bugs on OSX & C++, Bruno Haible, 2010/04/10
Re: gnulib bugs on OSX & C++, Bruno Haible, 2010/04/10