6

I am following a tutorial that says how to profile the program using gprof and the command given is like this

gcc -Wall -pg test_gprof.c test_gprof_new.c -o test_gprof

But it doesn'y give any explanation for this flag (-Wall)

2

1 Answer 1

9

As the name suggests it tells the compiler to enable all warning messages i.e. unused variables. This would help you to write better and clean code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.