https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121499
Robert Dubner <rdubner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |iains at gcc dot gnu.org
--- Comment #1 from Robert Dubner <rdubner at gcc dot gnu.org> ---
I finally got around to looking at this.
The inclusion of -f-no-strict-aliasing was edited into libgcobol/Makefile.am by
Iain Sandoe:
b90364ee1c09 (Iain Sandoe 2025-03-22 16:58:47 +0000 94) AM_CXXFLAGS +=
-fno-strict-aliasing
I have to assume that this is part of Iain's efforts to compile on an Apple
Darwin OS.
I hope Iain can comment. Perhaps, if it is necessary, the -fno-strict-aliasing
switch can be tucked into an IF DARWIN conditional.
I did the following as an experiment, and it didn't seem to have any ill
effects on an x86_64 build:
diff --git a/libgcobol/Makefile.am b/libgcobol/Makefile.am
index 183ddbb5f31..5362c962a79 100644
--- a/libgcobol/Makefile.am
+++ b/libgcobol/Makefile.am
@@ -91,9 +91,9 @@ AM_CFLAGS = $(XCFLAGS)
AM_CXXFLAGS = $(XCFLAGS)
AM_CXXFLAGS += $(WARN_CFLAGS)
AM_CXXFLAGS += -DIN_TARGET_LIBS
-AM_CXXFLAGS += -fno-strict-aliasing
if ENABLE_DARWIN_AT_RPATH
+AM_CXXFLAGS += -fno-strict-aliasing
# Handle embedded rpaths for Darwin.
extra_ldflags_libgcobol += -Wc,-nodefaultrpaths
extra_ldflags_libgcobol += -Wl,-rpath,@loader_path