From 8cd6567f440afa1a3d683b0fb1c72182dc1576e9 Mon Sep 17 00:00:00 2001 From: osalbahr <54853250+osalbahr@users.noreply.github.com> Date: Wed, 9 Nov 2022 05:05:39 -0500 Subject: [PATCH] gcc: add -g to -Wall -Og example (#9088) --- pages/common/gcc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/gcc.md b/pages/common/gcc.md index 0eee66bede..e2b0c9ebb4 100644 --- a/pages/common/gcc.md +++ b/pages/common/gcc.md @@ -7,9 +7,9 @@ `gcc {{path/to/source1.c path/to/source2.c ...}} -o {{path/to/output_executable}}` -- Show common warnings, debug symbols in output: +- Show common warnings, debug symbols in output, and optimize without affecting debugging: -`gcc {{path/to/source.c}} -Wall -Og -o {{path/to/output_executable}}` +`gcc {{path/to/source.c}} -Wall -g -Og -o {{path/to/output_executable}}` - Include libraries from a different path: