This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Use command line defines vs defining in header files.
On a similar note, why is #ifdef XXX used more than #if XXX?
Is there a technical reason or just that's the way it has been done?
Thanks,
Matt Minnis
At 03:23 PM 8/28/2000, Jan Dvorak wrote:
>On Mon, Aug 28, 2000 at 03:11:32PM -0500, rlau@csc.com wrote:
> >
> > Can anyone give me a strong argument as whether defining constants for
> > conditional compiling as compiler argument vs.
> > defining thems in header files?
> >
> > for examples:
> >
>
>Not all compilers supports -D, and you can get to line length limit on
>some systems (255 on dos ?). -D is useful when you have to specifi one or
>more really dependent argumenst (such as -DHAVE_CONFIG_H in autoconf does), and
>you get better readibility of code to search for #define than search
>through all the (generated) Makefile.
>
>Jan Dvorak <johnydog@go.cz>
Cthulhu for President. Why settle for a lesser evil?
=========================================================
Preferred Resources (314) 567-7600 phone
701 Emerson rd. (314) 993-6699 fax
Suite 475 mminnis@prefres.com
St. Louis, MO
63141
=========================================================