Question about compiler flags....

Started by Anonymous, April 23, 2005, 12:02:30 AM

Previous topic - Next topic

Anonymous

Ok, actually 2 questions...

If I use a compiler  flag twice in a project file...  For example:

CCFLAGS = -Tx86-coff -Ot -Ox -W1 -Gz -Ze -Zx -J #

then later...

 $(CC) $(CCFLAGS) -Ot "$!" -Fo"$@"

(note: -Ot used twice)


Is the effect that of toggling the flag back off in the second occurance? (i.e. is there a way of negating a default flag on a per-file basis?)

Also... if I use two flags that conflict... like -Ot and -Os... in the same type situation, which flag does the compiler use... the first one it finds or the last one it finds?

Pelle

No toggling, last option used.

Pelle
/Pelle

Anonymous

Quote from: "Pelle"No toggling, last option used.
Pelle

Thanks...

(I must still be a bit spoiled from Pascal.  The Borland compiler treats it's flags as toggles... specify something an odd number of times and it's on, an even number of times and it's off.)