1

I have a final exam next week, and in the exercise paper which is given us to study, there is a gcc option that I could not find on gcc manual page.

It is something like that gcc -J 4 program.c -o filename.

Is there someone knows that what it is for?

  • 2
    Sorry but it's borderline stupid to ask you to use an undocumented option if it's not covered in your course manual. – Julie Pelletier Jun 3 '16 at 22:08
  • gcc will complain with a lower case j : -j 4 : unrecognized command line option ‘-j’ . gcc: error: 4: No such file or directory. ... But is OK with -J 4 , i.e. an upper case J. - – Knud Larsen Jun 3 '16 at 23:10
  • @JuliePelletier I bet is an old gcc version – Braiam Jun 3 '16 at 23:31
  • 1
    I tried skimming the sources at github github.com/gcc-mirror/gcc/blob/master/gcc/opts-global.c and the online documentation gcc.gnu.org/onlinedocs. Nowhere is documented. Gfortran has a -J defined gcc.gnu.org/onlinedocs/gfortran/Directory-Options.html – Braiam Jun 3 '16 at 23:49
  • 1
    Since you wrote -J 4, as in with a number, and, since it doesn't seem to match anything in gcc, I wonder if this is confused with the -j <N>option of make. In make, it sets the maximum number of compilations to run in parallel: on a four-processor system one might run make -j4 to utilize all processors. – ilkkachu Jun 4 '16 at 10:04
2

There's only a Gfortran specific option called -J, but this doesn't make sense combined with a number. Other alternative is that is being confused with make -j n flag that determines the maximum number of concurrent compilation process.

  • Hi, what's the default if -j isn't specified? Thanks! – Hei Jan 3 '18 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.