gcc -Wall ഓപ്ഷൻ ഫ്ലാഗ്

gcc -Wall എല്ലാ കംപൈലറിന്റെ മുന്നറിയിപ്പ് സന്ദേശങ്ങളും പ്രാപ്തമാക്കുന്നു. മികച്ച കോഡ് സൃഷ്ടിക്കുന്നതിന് ഈ ഓപ്ഷൻ എല്ലായ്പ്പോഴും ഉപയോഗിക്കണം.

വാക്യഘടന

$ gcc -Wall [options] [source files] [object files] [-o output file]

ഉദാഹരണം

ഉറവിട ഫയൽ എഴുതുക myfile.c :

// myfile.c
#include <stdio.h/

int main()
{
    printf("Program run!\n");
    int i=10;
}

 

Myfile.c പതിവായി നിർമ്മിക്കുന്നത് സന്ദേശങ്ങളൊന്നും നൽകുന്നില്ല:

$ gcc myfile.c -o myfile
$

 

-വാൾ ഉപയോഗിച്ച് myfile.c നിർമ്മിക്കുക :

$ gcc -Wall myfile.c -o myfile
myfile.c In function 'main':
myfile.c:6:6: warning: unused variable 'i'
myfile.c:7:1: warning: control reaches end of non-void function
$

 

 

 


ഇതും കാണുക

ജിസിസി
ദ്രുത പട്ടികകൾ