POV-Ray : Newsgroups : povray.off-topic : Mini-languages : Re: Mini-languages Server Time
3 Sep 2024 23:30:28 EDT (-0400)
  Re: Mini-languages  
From: Warp
Date: 15 Nov 2010 13:52:14
Message: <4ce1815d@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> >   These are the same people who will not bother fixing their broken
> > C preprocessor even though they know it's broken (they have officially
> > stated that they won't fix it anytime soon).

> BTW, I don't think it's likely a matter of "won't bother" as much as it is 
> "have decided backwards-bug-compatibility is more important to our business 
> than being correct."  There are a fair number of bugs in various MS products 
> that don't get fixed because people are depending upon the buggy behavior.

> Remind me again what the problem is?

  Basically, preprocessor macro expansion should never create new tokens
unless the token pasting operator (##) is explicitly used to do so. However,
Microsoft's C preprocessor doesn't take this into account at all.

  For example, if you have:

#define STAR *

then /STAR should not start a comment. However, it does start a comment in
MSVC. Likewise if you have:

#define X -1
#define Y -X

then instantiating Y should not be an attempt to decrement a literal.
However, in MSVC it is.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.