🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #2161

Lattice C 5.04 -f8 bug

#2161
From: Ross D. Martin
Date: Thu, 16 Nov 1989 15:56
23 lines
840 bytes
The following code does not work when compiled with -f8:

#include<string.h>
char *s = "hi";
main()
{
printf("%f\n", 4.*strlen(s));
}

However, the following works fine:

char *s = "hi";
main()
{
printf("%f\n", 4.*strlen(s));
}

So apparently there is some problem with -f8 and the builtin string functions
that string.h defines.  The apparent fix is not to include string.h. 


		Ross Martin
		martin@enuxha.eas.asu.edu
Technical Details
Message-ID: <363@enuxha.eas.asu.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!asuvax!enuxha!martin

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!asuvax!enuxha!martin
From: martin@enuxha.eas.asu.edu (Ross D. Martin)
Newsgroups: comp.sys.amiga.tech
Subject: Lattice C 5.04 -f8 bug
Keywords: Don't include string.h!
Message-ID: <363@enuxha.eas.asu.edu>
Date: 16 Nov 89 15:56:54 GMT
Organization: Arizona State Univ, Tempe
Lines: 23