Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: w.f.alexander@attbi.com (Bill Alexander)
Subject: Re: CXX Compiler Barfs on traditional C cast
Date: 18 Aug 2003 10:04:25 -0700	[thread overview]
Message-ID: <4ae5eb22.0308180904.64dbd53d@posting.google.com> (raw)
In-Reply-To: 87wudebkdo.fsf@student.uni-tuebingen.de

Bummer!  But thanks for the lesson.  I guess I've started thinking of
c99 as "traditional" and didn't even consider this.  I must be getting
lazy.

- Bill

Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> wrote in message news:<87wudebkdo.fsf@student.uni-tuebingen.de>...
> w.f.alexander@attbi.com (Bill Alexander) writes:
> 
> > #define FOOBLD(x,y,z) ((foo){(x),(y),(z)})
> >
> > The .c version works perfectly and as I'd expect in traditional C.
> > The .cc version has a compiler failure with something like:
> > "error: expected expression" where the macro with the cast shows up.
> 
> This is not a "traditional cast". It's a compound literal. This was
> only introduced in C99, whereas C++ is based on C89. Therefore, the
> C++ compiler is correct in rejecting it.


      reply	other threads:[~2003-08-18 17:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-15 22:53 CXX Compiler Barfs on traditional C cast Bill Alexander
2003-08-15 22:56 ` Falk Hueffner
2003-08-18 17:04   ` Bill Alexander [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox