Re: Where to get a compatibility list of C and C++?
- From: "Rob Thorpe" <robert.thorpe@xxxxxxxxxxxx>
- Date: 26 Jul 2005 03:58:28 -0700
websnarf@xxxxxxxxx wrote:
> Rob Thorpe wrote:
> > websnarf@xxxxxxxxx wrote:
> > > Aladdin wrote:
> > > > Thanks a lot. I'm working on a compiler and constructing some
> > > > testcases.
> > > >
> > > > I'm looking for the feature ***supported in C but not in C++***.
> > >
> > > Oh that's easy; there are none.
> >
> > There are several. Try porting a C program to C++ and you'll soon find
> > them.
>
> Been doing this off and on for years. Haven't encountered any such
> phantom features so far.
long long is another that someone else mentioned.
> > > > Because C++ is designed back-compatible with C, such features may be
> > > > exceptional. But I know they exists, e.g. legacy language features.
> > >
> > > There are differences, but no drop in features. Unless you consider
> > > things like a seperate struct name space as actually a feature.
> >
> > The semantics of void * are different in C to C++. In C++ void* must
> > often be cast, but not in C. I consider the C semantics more useful.
>
> Yes, but I don't call that a *FEATURE*.
I suppose it depends on how small a thing you call a feature.
I once ported an interpreted language from C to C++. It used a great
number of void pointers to deal with functions in the C library that
the language called. Porting it to C++ made it slightly longer and
more difficult to read. In that, very unusual, case it was definitely
a feature.
.
- References:
- Where to get a compatibility list of C and C++?
- From: Aladdin
- Re: Where to get a compatibility list of C and C++?
- From: Jack Klein
- Re: Where to get a compatibility list of C and C++?
- From: Aladdin
- Re: Where to get a compatibility list of C and C++?
- From: websnarf
- Re: Where to get a compatibility list of C and C++?
- From: Rob Thorpe
- Re: Where to get a compatibility list of C and C++?
- From: websnarf
- Where to get a compatibility list of C and C++?
- Prev by Date: Re: limited no'of times execution
- Next by Date: Re: C with Assembly
- Previous by thread: Re: Where to get a compatibility list of C and C++?
- Next by thread: Re: Where to get a compatibility list of C and C++?
- Index(es):