From 5150aa2eb34a7439df1484ca4693cc3921111b3c Mon Sep 17 00:00:00 2001 From: Vishal Pankaj Chandratreya <19171016+tfpf@users.noreply.github.com> Date: Sun, 18 Aug 2024 12:00:28 +0530 Subject: [PATCH] Compile with `-fstrict-aliasing` According to the GCC manual, this flag is automatically added when optimisations are enabled, but I would like to always have it. --- custom-prompt/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom-prompt/Makefile b/custom-prompt/Makefile index c7b87c4..0a5d8e0 100644 --- a/custom-prompt/Makefile +++ b/custom-prompt/Makefile @@ -1,6 +1,6 @@ CC = gcc -CFLAGS = -std=c11 -Wall -Wextra -CXXFLAGS = -std=c++17 -Wall -Wextra +CFLAGS = -fstrict-aliasing -std=c11 -Wall -Wextra +CXXFLAGS = -fstrict-aliasing -std=c++17 -Wall -Wextra LDLIBS = -lstdc++ MainSource = custom-prompt.cc