From b42e5076ff9b43027377f71744e9c14935bf788f Mon Sep 17 00:00:00 2001 From: Oskar Date: Mon, 12 Aug 2024 19:33:50 +0200 Subject: i had fixed that issue earlier in the last commit with the if...else and break --- 3p36.cpp | 6 +----- Makefile | 4 ++-- UBasan-test.cpp | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 UBasan-test.cpp diff --git a/3p36.cpp b/3p36.cpp index 3928de5..4eb9b9e 100644 --- a/3p36.cpp +++ b/3p36.cpp @@ -8,11 +8,7 @@ * * 3.36 * - * I found a little bit of strangeness when comparing the vectors with '==' - * If i input for example 5 1's to the first vector - * and then i enter maybe 2 1's to the 2nd vector - * and then afterwards hit CTRL+D, the vector evaluates - * as equal... Not sure if it's supposed to be like this, they clearly aren't the same... + * */ int main () { diff --git a/Makefile b/Makefile index e171277..5d4ad87 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ CC1=clang++ CC2=g++ -CFLAGS_CLANG=-O0 -Wfatal-errors -Wall -Werror -Wextra -g3 -fsanitize=address -fsanitize=leak -Wpedantic -Wformat=2 -Wshadow -fno-common -std=c++2b -CFLAGS_GCC=-O0 -Wfatal-errors -Wall -Werror -Wextra -g3 -fsanitize=address -fsanitize=leak -Wpedantic -Wformat=2 -Wshadow -fno-common -std=c++2b -Wformat-truncation=2 -Wformat-overflow +CFLAGS_CLANG=-O0 -Wfatal-errors -Wall -Werror -Wextra -g3 -fsanitize=address,leak,undefined -Wpedantic -Wformat=2 -Wshadow -fno-common -std=c++2b +CFLAGS_GCC=-O0 -Wfatal-errors -Wall -Werror -Wextra -g3 -fsanitize=address,leak,undefined -Wpedantic -Wformat=2 -Wshadow -fno-common -std=c++2b -Wformat-truncation=2 -Wformat-overflow BINDIR=bin SRCS=$(wildcard *.cpp) OBJS_CLANG=$(patsubst %.cpp, $(BINDIR)/clang/%, $(SRCS)) diff --git a/UBasan-test.cpp b/UBasan-test.cpp new file mode 100644 index 0000000..a2d68f5 --- /dev/null +++ b/UBasan-test.cpp @@ -0,0 +1,15 @@ +#include +#include +#include "sales_data.hpp" +#include "sales_item.hpp" + +/* + * + * + * + * + */ + +int main () { + return 0; +} -- cgit v1.2.3