_temp_mmd_init size error

0 views
Skip to first unread message

Ron Blaschke

unread,
Apr 3, 2005, 6:36:25 AM4/3/05
to Leopold Toetsch, perl6-i...@perl.org
Parrot currently doesn't compile on Windows, b/c of the following in
F<classes/>.

const MMD_init _temp_mmd_init[] = {

};

error C2059: syntax error : '}'

There's gotta be at least one element in the array. Not sure why this
compiles on other platforms, though.

Ron


Leopold Toetsch

unread,
Apr 3, 2005, 11:46:51 AM4/3/05
to Ron Blaschke, perl6-i...@perl.org
Ron Blaschke <mailin...@rblasch.org> wrote:
> Parrot currently doesn't compile on Windows, b/c of the following in
> F<classes/>.

> const MMD_init _temp_mmd_init[] = {

> };

Thanks, fixed.

> There's gotta be at least one element in the array. Not sure why this
> compiles on other platforms, though.

gcc hasn't problems with it. Dunno what the standard says.

> Ron

leo

Ron Blaschke

unread,
Apr 3, 2005, 12:22:25 PM4/3/05
to Leopold Toetsch, perl6-i...@perl.org
Leopold Toetsch wrote:
> Ron Blaschke <mailin...@rblasch.org> wrote:
>> Parrot currently doesn't compile on Windows, b/c of the following in
>> F<classes/>.
>> const MMD_init _temp_mmd_init[] = {
>> };
> Thanks, fixed.

Great, thanks!

>> There's gotta be at least one element in the array. Not sure why this
>> compiles on other platforms, though.
> gcc hasn't problems with it. Dunno what the standard says.

MS VC++ has an error code "C2466 - cannot allocate an array of
constant size 0," an indication the standard says that Thou Shalt
Not Do It.

Ron


Leopold Toetsch

unread,
Apr 4, 2005, 3:46:14 AM4/4/05
to Ron Blaschke, perl6-i...@perl.org
Ron Blaschke <mailin...@rblasch.org> wrote:
> Leopold Toetsch wrote:

>>> There's gotta be at least one element in the array. Not sure why this
>>> compiles on other platforms, though.
>> gcc hasn't problems with it. Dunno what the standard says.

> MS VC++ has an error code "C2466 - cannot allocate an array of
> constant size 0," an indication the standard says that Thou Shalt
> Not Do It.

Ah, yep:

$ info gcc

,--[ C Extensions ]--------------------------
| Arrays of Length Zero
| =====================
|
| Zero-length arrays are allowed in GNU C.
`--------------------------------------------

> Ron

leo

Reply all
Reply to author
Forward
0 new messages