2009-07-16 15:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
 * config/global.cf
 * config/instsh.cf
   ! Fixed to only set __PLATFORM__ flags if there is really a cross
     build situation. This is to avoid redefinition warnings with dos
     on win builds.
   ; QUESTION: BTW, could we modify harbour compiler to not throw
these redef warnings for internally defined macros? This problem is
     still present if user is manually configuring HB_BIN_COMPILE to
     a platform native executable.

I do not think it's good idea.
If someone redefine existing macros then it's probably sth wrong
and pacifying warning messages can hide some serious problem so
I'm strongly against such modification. In this case it even not
resolve the problem because you still need precise -undef: macros
and any mistakes are not reported at all.

Yes, I didn't like it either, but could finally get a way around it.
Anyhow your idea below is a good solution.

Instead of pacifying chosen warning messages as workarounds for
problems in defining some predefined macros I think that we can
add parameter to compiler which disable platform dependent macros:
  __PLATFORM__*
  __ARCH??BIT__
  __{LITTLE,BIG,PDP}_ENDIAN__

so in cross builds you can use it and define any platform dependent
macros you want explicitly.
The question is only about new switch we should use or how to encode
it using existing switches, i.e.: -undef:+ARCH

Or we may start using '--' flags, like --noarchdef. If that's
not good, -undef is okay with me, maybe even better if made
case insensitive.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to