🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #499

initializing a long long

#499
From: Seth Copen Goldstein
Date: Thu, 15 Oct 1992 15:26
18 lines
982 bytes
I posted this to gnu.gcc.bugs, but maybe somehere can help me.

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.92Oct15152654@rodin2.CS.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!agate.Berkeley.EDU!sethg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!agate.Berkeley.EDU!sethg
From: sethg@rodin2.CS.Berkeley.EDU (Seth Copen Goldstein)
Newsgroups: gnu.gcc.help
Subject: initializing a long long
Date: 15 Oct 92 15:26:54
Organization: /home/auspex/b/threadid/sethg/.organization
Lines: 18
Distribution: world
Message-ID: <SETHG.92Oct15152654@rodin2.CS.Berkeley.EDU>
NNTP-Posting-Host: rodin2.cs.berkeley.edu