Skip to content

Conflicting rewrites for extern sized arrays #733

Open
@kyleheadley

Description

@kyleheadley

This happens in Lua:

lapi.c:35:12: error: redefinition of 'lua_ident' with a different type: 'const char _Checked[]' vs '_Array_ptr<const char>'
const char lua_ident _Checked[] =
           ^
./lua.h:147:31: note: previous declaration is here
extern _Array_ptr<const char> lua_ident : count(129);
                              ^

and in ZLib:

../trees.h:73:11: error (redefinition): redefinition of '_dist_code' with a different type: 'const uch _Checked[512]' vs '_Array_ptr<const uch>' (aka '_Array_ptr<const unsigned char>')
const uch _dist_code _Checked[DIST_CODE_LEN] = {
          ^
../deflate.h:321:32: note: previous declaration is here
  extern _Array_ptr<const uch> _dist_code : count(512);
                               ^

The compiler does not complain for simple examples, like when 3C converts one line in each file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions