GCC COMMANDLINE OPTIONS PART 1

commandline session

$cat main.c
#include<stdio.h>

int main(void)
{
printf("n The Geek Stuffn");
return 0;
}
$gcc main.c
$./a.out

The Geek Stuff
$gcc main.c -o main
$./main

The Geek Stuff
$gcc -Wall main.c -o main
$./main

The Geek Stuff
$cat main.c
#include<stdio.h>

int main(void)
{
int i;
printf("n The Geek Stuff [%d]n", i);
return 0;
}
$gcc -Wall main.c -o main
main.c: In function ‘main’:
main.c:6:10: warning: ‘i’ is used uninitialized in this function [-Wuninitialized]
$gcc -E main.c > main.i

Leave a comment

Your email address will not be published. Required fields are marked *