I don't understand how to access in a front end the arguments to the -I
option on the command line.  

Cobol has a feature similar to the C preprecessor, known as the
Compiler Directing Facility (CDF).  The CDF has a COPY statement that
resembles an #include directive in C, and shares the property that COPY
names a file that is normally found in a "copybook" which, for our
purposes, is a directory of such files.  The name of that directory is
defined outside the Cobol program.  

I would like to use the -I option to pass the names of copybook
directories to the cobol front end.  A bit of exploration yesterday left
me with the sense that the -I argument, in C at least, is not passed to
the compiler, but to the preprocessor. Access to -fmax-errors I think
I've figured out, but -I is a mystery. 

I'm a little puzzled by the status quo as I understand it.  Unless I
missed it, it's not discussed in gccint.  ISTM ideally there would be
some kind of getopt(3) processing, and the whole set of command-line
options captured in an array of structures accessible to any front
end.  Is that not the case and, if not, why not?  

Many thanks.  

--jkl

Reply via email to