NO

Author Topic: Question about compiler flags....  (Read 3184 times)

Anonymous

  • Guest
Question about compiler flags....
« 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:
Code: [Select]

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?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Question about compiler flags....
« Reply #1 on: April 23, 2005, 02:15:19 PM »
No toggling, last option used.

Pelle
/Pelle

Anonymous

  • Guest
Question about compiler flags....
« Reply #2 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.)