🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1208

long long initialization bug?

#1208
From: Seth Copen Goldstein
Date: Wed, 14 Oct 1992 22:23
16 lines
992 bytes
I am using gcc version 2.2.2 on a sun4.
I want to initialize a long long with the address of another variable in 
my program and gcc won't let me.  It will however let me initialize an int with
the address of another variable.  For example the following code:

	long long a = 1;
	int b = ((int)(&a));
	long long d = (long long)((int)(&a));

produces the following error messages:

	foo.c:4: initializer element for `d' is not computable at load time

why isn't it computable at runtime?

-seth
Technical Details
Message-ID: <SETHG.92Oct14182340@rodin2.CS.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!rodin2.cs.berkeley.edu!sethg

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!rodin2.cs.berkeley.edu!sethg
From: sethg@rodin2.cs.berkeley.edu (Seth Copen Goldstein)
Subject: long long initialization bug?
Message-ID: <SETHG.92Oct14182340@rodin2.CS.Berkeley.EDU>
Sender: gnulists@ai.mit.edu
Organization: /home/auspex/b/threadid/sethg/.organization
Distribution: gnu
Date: Wed, 14 Oct 1992 22:23:40 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 17