Hi,
I have a shell file with this content:
How can I execute ./try40.out only in case gcc issues no warning or error ?Code:clear gcc -g -Wall -Wextra -pedantic -std=c11 try40.c -lm -o try40.out ./try40.out
Hi,
I have a shell file with this content:
How can I execute ./try40.out only in case gcc issues no warning or error ?Code:clear gcc -g -Wall -Wextra -pedantic -std=c11 try40.c -lm -o try40.out ./try40.out
Look at $?
Code:gcc -g -Wall -Wextra -pedantic -std=c11 try40.c -lm -o try40.out if [ $? -eq 0 ]; then ./try40.out ; fi
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
-Werror is one way
Redirecting the stderr of the compilation to a file, and checking whether that file is empty is another.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.