Thread View: gnu.g++.help
1 messages
1 total messages
Started by Richard Stallman
Tue, 20 Nov 1990 17:47
(none)
Author: Richard Stallman
Date: Tue, 20 Nov 1990 17:47
Date: Tue, 20 Nov 1990 17:47
25 lines
1366 bytes
1366 bytes
>The grammar ambiguity shows up in
>
> int (x);
>
>which could either declare `x' as an integer or convert it to one.
I don't know what you mean by this. How does this break C programs when
compiled under C++?
It could break a few, since this is a valid declaration in C, but it
isn't likely to break very many. However, I think a grammatical
ambiguity is a problem in itself. I mentioned this as an example of
careless design, because chosing a slightly different syntax would
have avoided the problem entirely.
ARM, Ellis & Stroustrup Sec. 5.4:
" An explicit type converson can be expressed using either functional
notation or the _cast_ notation"
The manual then goes on to define the grammar of the cast notation. Looks
to me like its compatible with C.
The cast notation is not where the problem is.
It is in the functional notation.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads