🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5345

Re: (void) (void)

#5345
From: T. William Wells
Date: Wed, 07 Sep 1988 13:25
17 lines
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
Technical Details
Message-ID: <716@proxftl.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!uflorida!novavax!proxftl!bill
References: <8131@elsie.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!uflorida!novavax!proxftl!bill
From: bill@proxftl.UUCP (T. William Wells)
Newsgroups: comp.std.c
Subject: Re: (void) (void)
Message-ID: <716@proxftl.UUCP>
Date: 7 Sep 88 13:25:41 GMT
References: <8131@elsie.UUCP>
Reply-To: bill@proxftl.UUCP (T. William Wells)
Organization: Proximity Technology, Ft. Lauderdale
Lines: 16