[Top][All Lists]

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

Re: AC_*/AM_* macros for options

From: Paul Eggert
Subject: Re: AC_*/AM_* macros for options
Date: Tue, 29 Oct 2013 16:11:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

Jeffrey Walton wrote:
>> unfixable warnings for most network code due to macro expansion.  See:
>> >
>> >
>> >
>> > The pattern explained in that bug is still present in the current glibc
>> > headers.
> Well, you can do one of three things. You can allow the defective code
> to thrive, you can fix the defective code ...

That particular problem appeares to be fixed in current glibc.
On Ubuntu 13.10:

$ cat htnos.cpp
#include <netinet/in.h>
#include <arpa/inet.h>

void test( int port )
  struct sockaddr_in sa;
  sa.sin_port = htons( (uint16_t)port ); // << Warning here in optimized mode
$ g++ -Wconversion -c htnos.cpp 
[no output]

> bitops.h is banned from my code bases

bitops.h is not something provided by Autoconf or by
glibc, so I'm not sure what this (or the rest of your
email) is about.  Clearly you favor the use of functions
like strcpy_s, but it's not just Ulrich Drepper who's
skeptical of that sort of approach; see, for example

reply via email to

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