home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #23 / NN_1992_23.iso / spool / gnu / gcc / help / 2334 < prev    next >
Encoding:
Internet Message Format  |  1992-10-15  |  953 b 

  1. Path: sparky!uunet!think.com!ames!agate!agate.Berkeley.EDU!sethg
  2. From: sethg@rodin2.CS.Berkeley.EDU (Seth Copen Goldstein)
  3. Newsgroups: gnu.gcc.help
  4. Subject: initializing a long long
  5. Date: 15 Oct 92 15:26:54
  6. Organization: /home/auspex/b/threadid/sethg/.organization
  7. Lines: 18
  8. Distribution: world
  9. Message-ID: <SETHG.92Oct15152654@rodin2.CS.Berkeley.EDU>
  10. NNTP-Posting-Host: rodin2.cs.berkeley.edu
  11.  
  12. I posted this to gnu.gcc.bugs, but maybe somehere can help me.
  13.  
  14. I am using gcc version 2.2.2 on a sun4.
  15. I want to initialize a long long with the address of another variable in 
  16. my program and gcc won't let me.  It will however let me initialize an int with
  17. the address of another variable.  For example the following code:
  18.  
  19.     long long a = 1;
  20.     int b = ((int)(&a));
  21.     long long d = (long long)((int)(&a));
  22.  
  23. produces the following error messages:
  24.  
  25.     foo.c:4: initializer element for `d' is not computable at load time
  26.  
  27. why isn't it computable at runtime?
  28.  
  29. -seth
  30.