A89: Re: tigcc - some REAL routines this time [OT]


[Prev][Next][Index][Thread]

A89: Re: tigcc - some REAL routines this time [OT]




> These books combined with what Scott Noveck read in Bjorn Stoustroup's
book
> "The C++ Programming Language, 3rd Edition" I must conclude that C is a
> subset of C++. Therefore all C code _should_ compile in any C++ compiler
(I
> would be interested to see some that didn't).

I know that there's some normal code that has problems due to some slight
changes - something to do with returning pointers or something, I think -
and I know that there are exceptions; here's an interesting one that's
implementation defined in C++ and is usually not compatible:

blah = a//*b*/c;
*(d++);

can be taken as either one of:

blah = a * (d++);
(slash-slash taken as comment to end of line and continued on next line,
which is taken as multiplication rather than a pointer)

or

blah = a/c;
*(d++);
(taken as slash-star opens comment, b is ignored, star-slash closes comment,
and pointer to d increased by one)


just some food for thought -- I really wish that ticalc would make a TI-GCC
specific list already, since I've received some complaints about clogging
the 89 ASM one here =)

    -Scott