Re: [cc65] flexible arrays, enum & bool...

Date view Thread view Subject view

From: Andre Majorel (amajorel_at_teaser.fr)
Date: 2003-08-25 12:15:14


On 2003-08-25 11:23 +0200, Christian Krüger wrote:

> yesterday I had a session with cc65 2.9.2 and discovered
> that my structure change
> 
> 
> typdef struct
> {
> 	unsigned char something;
> 	unsigned char else[1];
> }
> MyStruct;
> 
> to
> 
> typdef struct
> {
> 	unsigned char something;
> 	unsigned char else[];
> }
> MyStruct;
> 
> still won't compile ('unknown size of struct').
> I hoped that this will work, sice Uz announched the
> C99 'flexible arrys' some time ago. Did I miss something?
> Where is the mistake?

I thought that C99 variable length arrays meant that you could
define an auto array whose size is not known at compile time (void
func (size_t n) { char buf[n]; }). Are you sure that they also
allow arrays whose size is not known at all ? What would you
expect the total size of struct MyStruct to be ?

-- 
André Majorel <amajorel_at_teaser.fr>
http://www.teaser.fr/~amajorel/
----------------------------------------------------------------------
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-08-25 12:15:34 CEST