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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s