Top-Rated Free Essay
Preview

Compiling

Satisfactory Essays
18744 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Compiling
gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$

gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$
gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$
gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$
gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$
gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$
gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$
gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$
gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$
gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$gcc -o / -O option flags gcc -o writes the build output to an output file. gcc -O sets the compiler's optimization level. gcc -o option flag gcc -O option flag gcc -o option flag
Write the build output to an output file.
Syntax
$ gcc [options] [source files] [object files] -o output file
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc myfile.c -o myfile
$ ./myfile
Program run
$

gcc -O option flag
Set the compiler's optimization level. option optimization level execution time code size memory usage compile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time -- + ++
-O3 optimization more for code size and execution time --- + +++
-Os optimization for code size -- ++
-Ofast O3 with fast none accurate math calculations --- + +++
+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more
Syntax
$ gcc -Olevel [options] [source files] [object files] [-o output file]
Example
myfile.c:
// myfile.c
#include

void main()
{
printf("Program run\n");
}

Build myfile.c on terminal and run the output file myfile:
$ gcc -O myfile.c -o myfile
$ ./myfile
Program run
$

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Nt1330 Unit 3 Essay

    • 604 Words
    • 3 Pages

    The whole point of implementing code efficiency is to reduce the amount processes and incorporate each process into one to make this more economical. The other point for code efficiency is to reduce the amount of time that the CNC machine takes to read each of the G-codes (by having say G81 instead of producing thirty lines of G-code, this removes a lot of useless and unneeded code from your program, plus you don’t need know how to produce aimless amounts of different types of code) and time taken for the programmer to produce the G-codes so that this reduces the operation time of producing the product, increases productivity, reduces human errors and increases profits. For example, if I wanted to drill ten holes into a billet, before canned cycles were in place, as the programmer you would need to produce almost thirty lines of G-codes in order to produce one hole, comparing to a single line of just using G81 and the coordinates for where you want the holes (this only increases the speed of producing the program, manufacturing the product and the ability of troubleshoot if there’s an issue). As I have stated above, this will reduce the amount of time of which the programmer will take to produce the code, makes it easier to understand the code, doesn’t fill up the computer’s memory and increased speeds of the CNC machine.…

    • 604 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    The Free Software Foundation is the principal organizational sponsor of the GNU Project. GNU developed many of the tools, including the C compiler, that are part of the Linux operating system.…

    • 638 Words
    • 2 Pages
    Good Essays
  • Good Essays

    C Is difficult, because the control flow is out of the hands of the application programmer…

    • 1508 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    Coding

    • 335 Words
    • 2 Pages

    of any impingements. The camera was then removed from the subacromial space. The area was then infiltrated with Marcaine. The posterior portal was then closed with absorbable sutures and Steri-Strips, and a Mepore dressing was placed on it. The arm was then placed in a sling; the patient awakened and was placed on her hospital bed and taken to the recovery room in good…

    • 335 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    It 255 Final Project

    • 1588 Words
    • 7 Pages

    It has come to my attention that your corporate security policy for the firm is out of date and that it needs to be updated. In my time here as an intern I have reviewed the security policy and revised it to keep up with all of the technological updates going on in the internet world today.…

    • 1588 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    System Build Project

    • 391 Words
    • 2 Pages

    o What part can technology solve- Data access availability companywide that is in one location.…

    • 391 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Comp II Final Project

    • 1628 Words
    • 7 Pages

    In 1984, there were 40 people in the State of Maine diagnosed with Autism. Now a one child for every 150 in Maine is diagnosed within the Autism spectrum. Every year more children with Autism reach adulthood. At that point there is an incredible shortage of programs available for these young adults.…

    • 1628 Words
    • 7 Pages
    Better Essays
  • Good Essays

    comp 1 final project

    • 536 Words
    • 3 Pages

    Do you know how many people visit the emergency room a day? According to (admin, 2011) there is about 1.7 million people that visit an emergency room a day. Most people think that hospital emergency rooms are scary, but also find that they are very interesting. They like to work at jobs that keep them on their toes.…

    • 536 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Compilation Report

    • 283 Words
    • 2 Pages

    We have compiled the accompanying balance sheet of Proli Footwear, Inc. as of December 31, 2014, and the related statements of income and retained earnings and cash flows for the year then ended. We have not audited or reviewed the accompanying financial statements and, accordingly, do not express an opinion or provide any assurance about whether the financial statements are in accordance with accounting principles generally accepted in the United States of America.…

    • 283 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Programming

    • 3038 Words
    • 13 Pages

    2. Each of the flowchart segments in Figure 3-35 is unstructured. Redraw each flowchart segment so that it does the same thing but is structured.…

    • 3038 Words
    • 13 Pages
    Good Essays
  • Satisfactory Essays

    CISSH

    • 1734 Words
    • 7 Pages

    cissh and run it on testScript.txt. You will notice that the redirected input and pipe…

    • 1734 Words
    • 7 Pages
    Satisfactory Essays
  • Powerful Essays

    Basic Comp

    • 1882 Words
    • 8 Pages

    “I had imposed a grid of interests on the street, which left no space for blond children and gravy adverts and paving stone and the colours of shop fronts and the expressions of businesspeople and pensioners”(Botton, 63). What is a grid of interest, and what does it mean to impose one on something? Based on de Botton’s above quote, to impose a grid of interest on something means that you only see what you want to see. Grid of interest is also the only thing you are focusing on as you are trying to reach your destination, and you block out everything that is around you except for the material or object that relates to the goal you are trying to reach. For example, if you are late for the bus, the only thing going through your head is to find the nearest bus stop, so you can catch the next LX bus to Scott Hall. You won’t see the trees or the buildings or the people around you. You may only see the bus stop up ahead, thus you imposed one on the route to the bus stop. A grid of interest can relate to anything outside of our neighborhood, especially when we go on vacations or travel to a nearby city. People all over the world use grid of interest, but let’s focus mainly on the American citizens like students trying to catch the next bus to their next class, celebrities dodging the millions of paparazzi after a concert or the business men/women in the busy cities going to work. They all use grid of interest to make life easier or more relaxing or less stressful.…

    • 1882 Words
    • 8 Pages
    Powerful Essays
  • Satisfactory Essays

    Program Proper

    • 359 Words
    • 2 Pages

    TCU TOP MANAGEMENT Board of Regents HON. MAYOR MA. LAARNI “LANI” L. CAYETANO Chair ATTY.LUTGARDO B. BARBO Vice Chair Members: HON. COUN.…

    • 359 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    program workshop

    • 428 Words
    • 2 Pages

    A workshop on mainstreaming IKS in Science & Mathematics Education and in the whole South African Society…

    • 428 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Computer project

    • 693 Words
    • 3 Pages

    I have heard that your institution is in need of a new office Manager. I am interested in the job.…

    • 693 Words
    • 3 Pages
    Good Essays