Pelles C forum

Pelles C => General discussions => Topic started by: Anonymous on April 23, 2005, 12:02:30 AM

Title: Question about compiler flags....
Post by: Anonymous on April 23, 2005, 12:02:30 AM
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?
Title: Question about compiler flags....
Post by: Pelle on April 23, 2005, 02:15:19 PM
No toggling, last option used.

Pelle
Title: Question about compiler flags....
Post by: Anonymous on April 23, 2005, 09:24:25 PM
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.)