This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Predefining __OS_DOS__



  In message <19981206160259.J189@esmeralda.gerwinski.de>you write:
  > Jeffrey A Law wrote:
  > > 
  > > You say it is important to Pascal -- why?  Seems to me that is this purel
  > y
  > > a target issue, why does Pascal about defining __OS_DOS__ for the target?
  > > 
  > > I'd actually recommend programmers use the specific case they care about.
  > 
  > Up to now, `MSDOS', `_WIN32' and `__EMX__' always occured in
  > this combination in the GPC project.  Sometimes someone forgot
  > one (or two) of them and caused unpleasant bugs.  I don't know,
  > but I can imagine that similar things have happened in the C
  > world, too.
True.  This can be a problem.  But I'd prefer people to actually think about
the code they write instead of depending on this kind of crutch.

I'd think it is just as likely that someone will start using __OS_DOS__ for
code they think is common to dos-like systems, when in fact it is not common
to all the dos-like systems.

Additionally, less and less code in the compiler should be conditional on
host defines of this nature.  Instead we should be depending on autoconf
macros and defines which indicate the availability or non-availability of
specific features.  This is the general direction most FSF code is taking
and __OS_DOS__ seems to me like a step backwards.

  > This is confusing for Pascal programmers since there is no
  > symbol `||' in Pascal.
But there's also no #ifdef in Pascal.  If they can learn about #ifdef,
#define and friends, they can learn about ||. :-)

  > There are no header files in Pascal.  One would have to add this
  > to each source file.
Err, if you're using cpp, then you have #include capabilities.  How else are
you testing #ifdefs?

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]