Boost logo

Boost Users :

From: Christopher Currie (Christopher_at_[hidden])
Date: 2002-11-14 15:13:47


In article <aqs5gp$php$1_at_[hidden]> you wrote:
> The only major difference in the CVS is that the CVS automatically uses the
> Borland configuration for Sun's preprocessor. Can you do a small test for
> me? What is the preprocessed result of this:
>
> #define A(x, y) (x, y)
> #define B(args) A args
>
> B(xyz) // ??
>
> This is the essence of the Borland bug. It *should* yield:
>
> A xyz
>
> Borland, however, yields:
>
> Axyz
>
> I'm just curious if this is the specific problem with Sun's preprocessor as
> well.

No, the Sun preprocessor bug is similar, but only applies when a macro
name
is used as an argument to another macro. Thus:

#define A(args) args
#define B()

A(B C) // ?

should yield:

B C

but in fact produces

BC

Sun has acknowledged the bug (Bug id 4763527). Oddly enough, the _C_
preprocessor does not have this bug.

Christopher


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net