Re: [cc65] Passing variables from asm to c and vice versa

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2008-08-05 22:17:01
On Tue, Aug 05, 2008 at 09:59:42PM +0200, Groepaz wrote:
> eeeeeh did you actually link a proper second file that has these pointers?

The source will not even compile, so there's no chance to link a second file.

> i am using a similar (almost exactly the same) construct to include all my
> binary data in dozens of projects, all compiled with gcc :)

Maybe your variables weren't declared "static"?

This is what the standard says about constant initializers:

-----------------------------------------------------------------------------
6.6 Constant expressions
[...]
6 An integer constant expression shall have integer type and shall only have
  operands that are integer constants, enumeration constants, character
  constants, sizeof expressions whose results are integer constants, and
  floating constants that are the immediate operands of casts. Cast operators
  in an integer constant expression shall only convert arithmetic types to
  integer types, except as part of an operand to the sizeof operator.

7 More latitude is permitted for constant expressions in initializers. Such a
  constant expression shall be, or evaluate to, one of the following:

  - an arithmetic constant expression,

  - a null pointer constant,

  - an address constant, or

  - an address constant for an object type plus or minus an integer constant
    expression.

[...]
6.7.8 Initialization
[...]
4 All the expressions in an initializer for an object that has static storage
  duration shall be constant expressions or string literals.
-----------------------------------------------------------------------------

> or i am missing something =P

Probably yes:-)

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Aug 5 22:17:12 2008

This archive was generated by hypermail 2.1.8 : 2008-08-05 22:17:14 CEST