lmi
[Top][All Lists]
Advanced

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

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


From: Greg Chicares
Subject: [lmi] "Implicit int" vs. '-fms-extensions'
Date: Tue, 11 Jun 2019 16:29:15 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

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

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

Here's a demonstration, for which
  make unit_tests unit_test_targets=sandbox_test.exe
reports no errors, even with strong warnings enabled, including Wpedantic:

---------8<--------8<--------8<--------8<--------8<--------8<--------8<-------
diff --git a/sandbox_test.cpp b/sandbox_test.cpp
index bbc998e0..4a1f69a8 100644
--- a/sandbox_test.cpp
+++ b/sandbox_test.cpp
@@ -23,6 +23,8 @@
 
 #include "test_tools.hpp"
 
+f() {return 0;}
+
 int test_main(int, char*[])
 {
     return 0;
--------->8-------->8-------->8-------->8-------->8-------->8-------->8-------



reply via email to

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