Questions tagged [compiler-options]

Compiler-options are parameters that are being passed to the compiler and that affect the compilation process or its resulting product.

Modern compilers have a large set of options that can be used to somehow change the way the code is compiled. Usually those options are passed as command-line flags.

Example for Java:

javac -target 1.5 -bootclasspath jdk1.5.0\lib\rt.jar \ -extdirs "" OldCode.java

More information about particular options can be found on compiler vendor's websites, to name a few:

244 questions
-1
votes
2 answers

Is this compiler optimization inconsistency entirely explained by undefined behaviour?

During a discussion I had with a couple of colleagues the other day I threw together a piece of code in C++ to illustrate a memory access violation. I am currently in the process of slowly returning to C++ after a long spell of almost exclusively…
-1
votes
2 answers

Is there a Java compiler option to allow if(object)?

I want to be able to type something like this: if (object) { // some code... } and have the compiler see it as this: if (object != null) { // some code... } Is there any way I can do this? Alternatively: is there anything that can be done…
Ky -
  • 30,724
  • 51
  • 192
  • 308
-3
votes
3 answers

Is Sign Extension in C++ a compiler option, or compiler dependent or target dependent?

The following code has been compiled on 3 different compilers and 3 different processors and gave 2 different results: typedef unsigned long int u32; typedef signed long long s64; int main () { u32 Operand1,Operand2; s64 Result; Operand1=95; …
AYZAB
  • 5
  • 3
-4
votes
1 answer

For running C code in linux what does `gcc -g -lm -std=c99 -Wall -Wextra` means?

These will be the flags used to run my code, I am a beginner in C and don't know what each one is used for. The code I must write for this is basically a string manipulation. Wonder if there is a website that gets many flags together? gcc -g -lm…
Porton_
  • 113
  • 1
  • 5
1 2 3
16
17