Kendall Bennett wrote:
> 
> Wolfram Gloger <[EMAIL PROTECTED]> wrote:
> 
> > Huh ?  If this really happens, it is an obvious, and rather
> > horrible preprocessor bug.  `4ub' _must_ be parsed as a single
> > preprocessor number token (although it is not a valid integer
> > constant token).  See the ANSI C standard 6.1.8.
> 
> It may well be an ANSI violation for this to work, but we all know
> that many compilers do not always follow the ANSI guidelines as much
> as we would like. Portability work is about making sure the code
> works with all compilers, more so than following the ANSI standard
> ;-).

I agree.  I've had to code around many compiler bugs in Mesa in the
past.  It's unfortunate but it's reality.


 
> > > The solution to this problem (and what we do in our code
> > > where we do this type of thing) is to always use an underscore in
> > > front of the names passed to macros that use token pasting:
> >
> > This is no solution, it's a workaround for a buggy preprocessor.
> > [Note: I'm not opposed against applying such a change, but the
> > reasoning should be clear.]
> 
> Sure, it may be a workaround but we can't compile the code without it.
> 
> > And your examples for `badly used token pasting' and `rampant
> > problems' in the sources were ?
> 
> The token pasting problem was in several places in the code, and we
> have fixed that in our copies.

Will you be checking that into Mesa CVS soon?


> ...


-Brian


_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to