Skip to content

Commit

Permalink
Clarify compiler args, eliminate some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar authored and jmarrec committed Dec 22, 2023
1 parent ce006a6 commit 34493f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions cmake/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,13 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O
target_compile_options(project_warnings INTERFACE -Wno-aggressive-loop-optimizations)
# Sadly, GCC 13.2 is throwing many false positives on dangling references and compile time array-bounds
# https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=6b927b1297e66e26e62e722bf15c921dcbbd25b9
# https://trofi.github.io/posts/264-gcc-s-new-Wdangling-reference-warning.html
target_compile_options(project_warnings INTERFACE -Wno-dangling-reference)
# The array-bounds appears to be problematic as well depending on the optimization level chosen
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100430
target_compile_options(project_warnings INTERFACE -Wno-array-bounds)
# depending on the level of overflow check selected, the stringop-overflow can also emit false positives
# https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-overflow
target_compile_options(project_warnings INTERFACE -Wno-stringop-overflow)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
Expand Down
3 changes: 0 additions & 3 deletions src/EnergyPlus/IOFiles.hh
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ private:
std::string_view spec_builder()
{
buffer.clear();
// This line seems to be the culprit with some array-bounds warnings
// during compilation on GCC 13.2. I don't see how at the moment.
// I tried pragma-ing it away but it didn't help
buffer.push_back('{');
buffer.push_back(':');
// [[fill]align][sign]["#"]["0"][width]["." precision]["L"][type]
Expand Down

0 comments on commit 34493f7

Please sign in to comment.