🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4451

Re: Is it valid?

#4451
From: Dan Pop
Date: Fri, 08 Dec 1995 10:44
20 lines
1097 bytes
In <4a75e2$cgj@pyrrhus-f.hrz.tu-chemnitz.de> hfst@hrz.tu-chemnitz.de (Hans Steffani) writes:

>Is something like
>
> ("Hallo");
>
>valid code? I thought it is code which does not do
>anything but is valid but my compiler complains about.

If this line appears as a statement in a function body, it is a perfectly
legal expression statement.  Of course, the compiler is free to emit
diagnostics (e.g. "warning: statement with no effect") but it has to
translate your code correctly.  Otherwise, your compiler is broken.

Dan
--
Dan Pop
CERN, CN Division
Email: danpop@mail.cern.ch 
Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
Technical Details
Message-ID: <danpop.818419487@rscernix>
Path: arc1-ca.pugleaf.net!CERN.ch!rscernix!danpop
References: <4a75e2$cgj@pyrrhus-f.hrz.tu-chemnitz.de>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!CERN.ch!rscernix!danpop
From: danpop@mail.cern.ch (Dan Pop)
Subject: Re: Is it valid?
X-Nntp-Posting-Host: ues5.cern.ch
Message-ID: <danpop.818419487@rscernix>
Sender: news@news.cern.ch (USENET News System)
Organization: CERN European Lab for Particle Physics
X-Newsreader: NN version 6.5.0 #7 (NOV)
References: <4a75e2$cgj@pyrrhus-f.hrz.tu-chemnitz.de>
Date: Fri, 8 Dec 1995 10:44:47 GMT