[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 12:57:35 -0700 |
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
Description: Binary data
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++,
Jarno Rajahalme <=
Re: gnulib bugs on OSX & C++, Bruno Haible, 2010/04/10