On Thu, Sep 6, 2018 at 2:45 AM, John Selbie wrote:
>> For Unixy builds, just don't specify -std. Only specify -std if you want
> to ensure that builds will work with earlier standards, compilers, or
> libraries, or for -std=c* without any special language or library features,
> in which case you m
Hi John,
On Thu, Sep 6, 2018 at 8:45 AM, John Selbie wrote:
> A…. that was my mistake. I had erroneously assumed that not specifying
> -std would result in the oldest version of C++.
This depends on the compiler. For a long time, the default C++ dialect
used by both GCC and clang was C++98.
> For Unixy builds, just don't specify -std. Only specify -std if you want
to ensure that builds will work with earlier standards, compilers, or
libraries, or for -std=c* without any special language or library features,
in which case you may also want to add -pedantic or more restrictive
options.
On Wed, 5 Sep 2018 at 14:41, Brian Inglis wrote:
> _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
Relavent xkcd - https://xkcd.com/927/
--
Doug Henderson, Calgary, Alberta, Canada - from gmail.com
--
Problem reports: http://cygwin.com/problems.html
FAQ: ht
On 2018-09-05 13:36, John Selbie wrote:
> On Wed, Sep 5, 2018 at 11:46 AM Hans-Bernhard Bröker wrote:
>> Am 05.09.2018 um 07:55 schrieb John Selbie:
>>> With this: g++ foo.cpp -c -std=c++11
>>> It compiles fine everywhere else, except CygWin. Output on Cygwin:
>> I'm afraid that may mean everywher
Thanks for the response.
But why is getaddrinfo (and its associated struct types and flag values)
considered a "language extension" and hidden via the __POSIX_VISIBILE
define when other function declarations in netdb.h (such as getservbyname)
are not?
I don't believe C++ has any formal support fo
Am 05.09.2018 um 07:55 schrieb John Selbie:
With this: g++ foo.cpp -c -std=c++11
It compiles fine everywhere else, except CygWin. Output on Cygwin:
I'm afraid that may mean everywhere else is wrong.
Yes, switching to -std=gnu++11 or adding -D_DEFAULT_SOURCE to the command
line line works.
Updating Stuntman (Open source Stun Server) from C++ to modern C++. I ran
into an issue.
This code:
#include
#include
#include
int some_networking_code()
{
addrinfo* addr = NULL;
int flags = AI_NUMERICHOST;
return 0;
}
Compiles fine everywhere: wit
8 matches
Mail list logo