lmi
[Top][All Lists]
Advanced

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

Re: [lmi] "Implicit int" vs. '-fms-extensions'


From: Vadim Zeitlin
Subject: Re: [lmi] "Implicit int" vs. '-fms-extensions'
Date: Tue, 11 Jun 2019 19:02:10 +0200

On Tue, 11 Jun 2019 16:29:15 +0000 Greg Chicares <address@hidden> wrote:

GC> Should we be using '-fms-extensions', which the MinGW-w64 maintainers
GC> have enabled by default? This post:
GC>   https://cygwin.com/ml/cygwin/2019-06/msg00121.html
GC> points out that it enables "implicit int" (demonstrated below).

 The linked StackOverflow post (https://stackoverflow.com/a/56537459/827263)
seems to say that it's actually much worse than that:

        anything that would have generated the message ISO C++ forbids
        declaration of %qs with no type is actually admitted, with int
        being used for the type.

I had no idea that (any) pointer could be interpreted as being pointer to
int with this option, this seems very dangerous and, at least to me,
completely unexpected.

GC> The gcc documentation explains it differently for different languages:
GC>  [C] Accept some non-standard constructs used in Microsoft header files.
GC>  [C++] Disable Wpedantic warnings about constructs used in MFC, such as
GC>   implicit int and getting a pointer to member function via non-standard
GC>   syntax.
GC> Vadim, do you know whether this option is necessary for wxWidgets?

 We definitely shouldn't be using them and I'm all but certain we don't,
but I guess the only real proof would be to build everything with an
explicit -fno-ms-extensions. I didn't have time to do this yet, but can try
doing it soon.

GC> If it isn't, then we should probably turn it off for lmi.

 Yes, if there are no problems with the standard headers (i.e. windows.h
and everything included from it) without this option, then we definitely
should.

 Regards,
VZ

Attachment: pgpxAGZWW0YLL.pgp
Description: PGP signature


reply via email to

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