Warnings

Other topics

Remarks:

It is a good practice to enable most warnings while developing a software.

Enable nearly all warnings

C source file

gcc -Wall -Wextra -o main main.c

C++ source file

g++ -Wall -Wextra -Wconversion -Woverloaded-virtual -o main main.cpp

Syntax:

  • gcc [-Woption [-Woption [...]]] src-file

Parameters:

ParameterDetails
optionIt can be used to enable or disable warnings. It can make warnings into errors.
src-fileThe source file to be compiled.

Contributors

Topic Id: 6501

Example Ids: 22315

This site is not affiliated with any of the contributors.