Implicit integer and floating point promotions in C++0x

I

Ioannis Vranos

Does anyone know the changes of C++0x from C++98/03 regarding implicit integer ad floating point promotions?


Thanks.
 
B

Bo Persson

Ioannis said:
Does anyone know the changes of C++0x from C++98/03 regarding
implicit integer ad floating point promotions?

Those rules are inherited from C, so none.


Bo Persson
 
A

Alf P. Steinbach

* Jack Klein:
Implicit integer was not inherited from C. It was still legal in C95,
which C++98 based itself on, but it has never been legal in C++.

Depends what you mean. In the standard's terminology which, one should note, is
generally vague and self-contradictory, "implicit 'int'" is not supported.
However, as a descriptive term we still have implicit 'int' in e.g. 'short x;'.

Cheers,

- Alf
 
I

Ioannis Vranos

Jack said:
Implicit integer was not inherited from C. It was still legal in C95,
which C++98 based itself on, but it has never been legal in C++.


I asked about implicit promotions, and I think this was inherited from C95.



--
Ioannis A. Vranos

C95 / C++03 Developer

http://www.cpp-software.net
 
J

James Kanze

I asked about implicit promotions, and I think this was
inherited from C95.

That's the way I read your statement too, but it can easily be
interpreted two ways "(implicit integer) and (floating point
promotions)" or "implicit (integer and floating point
promotions)". Jack obviously interpreted it the first way.
Technically, of course, it's "implicit int" and not "implicit
integer" in that case. But technically, the standard doesn't
talk about "implicit promotions", perhaps because there's no
explicit promotions to compare them to. (The standard
distinguishes between "promotions" and "conversions"; roughly
speaking, conversions occur to change a type to a target type,
promotions occur "spontaneously", even without a target type.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top