Skip to content

Commit eaf7948

Browse files
committed
v4: Change GCC10+ warnings to status messages
1 parent 144a0f7 commit eaf7948

File tree

2 files changed

+8
-25
lines changed

2 files changed

+8
-25
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
### Deprecated
1919

20+
## [4.14.0] - 2025-03-24
21+
22+
### Removed
23+
24+
- Removed warning about setting `-fallow-argument-mismatch` and `-fallow-invalid-boz` with GCC 10+. This is pretty much common now. Instead, we emit a message
25+
2026
## [4.13.0] - 2025-03-18
2127

2228
### Removed

compiler/flags/GNU_Fortran.cmake

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,38 +55,15 @@ if (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
5555
# First for the argument mismatch
5656
option(MISMATCH_IS_ERROR "Argument mismatches are errors, not warnings" OFF)
5757
if (NOT MISMATCH_IS_ERROR)
58-
ecbuild_warn (
59-
"Argument mismatches will be treated as *warnings* and not *errors*. "
60-
"Per the gfortran 10 man page:\n"
61-
"Some code contains calls to external procedures which \n"
62-
"mismatches between the calls and the procedure definition, \n"
63-
"or with mismatches between different calls. Such code is \n"
64-
"non-conforming, and will usually be flagged wi1th an error. \n"
65-
"This options degrades the error to a warning, which can \n"
66-
"only be disabled by disabling all warnings vial -w. Only a \n"
67-
"single occurrence per argument is flagged by this warning. \n"
68-
"-fallow-argument-mismatch is implied by -std=legacy.\n"
69-
"Using this option is *strongly* discouraged. It is possible to \n"
70-
"provide standard-conforming code which allows different types \n"
71-
"of arguments by using an explicit interface and TYPE(*).")
7258
set (MISMATCH "-fallow-argument-mismatch")
59+
message(STATUS "[GCC10+] Setting -fallow-argument-mismatch to allow argument mismatches")
7360
endif ()
7461

7562
# Then for BOZ constants
7663
option(INVALID_BOZ_IS_ERROR "Use of invalid BOZ constants are errors, not warnings" OFF)
7764
if (NOT INVALID_BOZ_IS_ERROR)
78-
ecbuild_warn(
79-
"Invalid use of BOZ literal constants will be treated as *warnings* and not as *errors*. "
80-
"Per the GCC 10 release notes:\n"
81-
"The handling of a BOZ literal constant has been reworked \n"
82-
"to provide better conformance to the Fortran 2008 and 2018 \n"
83-
"standards. In these Fortran standards, a BOZ literal constant is a \n"
84-
"typeless and kindless entity. As a part of the rework, documented \n"
85-
"and undocumented extensions to the Fortran standard now emit \n"
86-
"errors during compilation. Some of these extensions are permitted \n"
87-
"with the -fallow-invalid-boz, where the error is degraded to a \n"
88-
"warning and the code is compiled as with older gfortran.")
8965
set (ALLOW_BOZ "-fallow-invalid-boz")
66+
message(STATUS "[GCC10+] Setting -fallow-invalid-boz to allow invalid BOZ constants")
9067
endif ()
9168
endif ()
9269

0 commit comments

Comments
 (0)