🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2287

Re: a problem with printf

#2287
From: S. Lee
Date: Thu, 14 Mar 1996 13:59
56 lines
1682 bytes
In article <4i7vpu$432@solutions.solon.com>,
walter briscoe  <walter@wbriscoe.demon.co.uk> wrote:
 :In article <4i6hn8$pc9@solutions.solon.com> motte@ens.lifl.fr  writes:
 :
 :> PS : sorry, but I do not speak english very well.
 :> ----------
 :
 :Meiux que je parle francais. J'ai essaye pc-lint. Il a trouve

disclaimer: I do not speak French at all.

 :[snip]
 :
 :> void echanger ( fichier *f1, fichier *f2 )
 :> {
 :>   fichier *tmp;
 :>   *tmp=*f1; /* tmp n'indique rien ici */
 :>   *f1=*f2;
 :>   *f2=*tmp;
 :> }
 :
 :j'ai essaye
 :
 :void echanger ( fichier *f1, fichier *f2 )
 :{
 :  fichier *tmp;
 :  tmp=*f1;
 :  *f1=*f2;
 :  *f2=tmp;
 :}
 :
 :Tout sera bien.

But you probably mean "fichier tmp;" instead of "fichier *tmp" in the
above, right?

 :Il y a aussi:
 :
 :void echanger ( fichier *f1, fichier *f2 )
 :{
 :  fichier *tmp;
 :  tmp=f1;
 :  f1=f2;
 :  f2=tmp;
 :}
 :
 :Mais, ca fait rien!!
 :
[...]
 :I would be interested in a tool which would detect the problem in the
 :third version of "echanger".  Pc-lint/Flexelint do not.

Maybe an optimizer can tell you it generated no code for a function.

sl14@cornell.edu
Witty .sig under construction.
Technical Details
Message-ID: <4i98ng$8qd@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4i6hn8$pc9@solutions.solon.com> <4i7vpu$432@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: sl14@crux1.cit.cornell.edu (S. Lee)
Newsgroups: comp.lang.c.moderated
Subject: Re: a problem with printf
Date: 14 Mar 1996 07:59:12 -0600
Organization: Nekomi Institute of Technology
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4i98ng$8qd@solutions.solon.com>
References: <4i6hn8$pc9@solutions.solon.com> <4i7vpu$432@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com