Re: [cc65] Another wish: Unsized Arrays in Structures

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2003-01-23 01:00:48


On Wednesday 22 January 2003 23:37, Christian Krüger wrote:
> Hi again,
>
> today I've tried to compile something like this:
>
> --8<-------------------
>
> typedef struct
> {
>   unsigned char width;
>   unsigned char height;
>   unsigned char data[];
> }
> TestStruct;
>
> --8<-------------------

<snip>

why dont you simply use

 typedef struct
 {
   unsigned char width;
   unsigned char height;
   unsigned char *data;
 }
 TestStruct;

?

-- 
          ___ ___ .___________________ .___________ _______.
    c=64 /   |   \|   \__    ___/     \ \_   _____/ \      \ [groepaz]
     gb /    '    \   | |    | /  \ /  \ |    __)_  /   |   \ gp32
    cgb \    .    /   | |    |/    '    \|        \/    |    \ psx
     gba \___|_  /|___| |____|\____|__  /_______  /\____|__  / dc
          -----\/-----'---------------\/--------\/---------\/
       http://www.hitmen-console.org    Hitmen WWW Headquarters
       http://fly.to/hitmen-groepaz     my personal playground
       http://rr.c64.org/silversurfer   home of the RR debugger
       ftp.musoftware.de/pub/groepaz    cc65 dump site

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-01-23 00:58:47 CET