Thread View: comp.std.c
3 messages
3 total messages
Started by Arthur David Olson
Mon, 05 Sep 1988 17:18
(void) (void)
Author: Arthur David Olson
Date: Mon, 05 Sep 1988 17:18
Date: Mon, 05 Sep 1988 17:18
9 lines
409 bytes
409 bytes
main()
{
(void) (void) 5;
return 0;
}
Is the above legal ANSI code? Should it be?
--
ado@ncifcrf.gov ADO is a trademark of Ampex.
Re: (void) (void)
Author: Doug Gwyn
Date: Tue, 06 Sep 1988 03:16
Date: Tue, 06 Sep 1988 03:16
6 lines
606 bytes
606 bytes
In article <8131@elsie.UUCP> ado@elsie.UUCP (Arthur David Olson) writes: > (void) (void) 5; >Is the above legal ANSI code? Should it be? It's supposed to be. I remember the committee voting explicitly to allow casting a void expression to void.
Re: (void) (void)
Author: T. William Wells
Date: Wed, 07 Sep 1988 13:25
Date: Wed, 07 Sep 1988 13:25
17 lines
935 bytes
935 bytes
In article <8131@elsie.UUCP> ado@elsie.UUCP (Arthur David Olson) writes: : (void) (void) 5; : Is the above legal ANSI code? Should it be? From section 3.2.2.2: "The (nonexistent) value of a *void expression* (an expression that has type _void_) shall not be used in any way, and implicit or explicit conversions (except to _void_) shall not be applied to such an expression." In other words, yes: there is a specific exception in the standard that permits this. --- Bill novavax!proxftl!bill
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