Re: FFI in interpreter mode

  • From: James McKaskill <james@xxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 24 May 2012 00:10:49 -0400

On Wed, May 23, 2012 at 11:51 PM, Evan Wies <evan@xxxxxxxxxxxxx> wrote:
> It was:
> typedef uint8_t foo_t[48];
> typedef struct foo_t {
>    // 48 structured bytes
> } foo_t;

Which I know isn't legal in C++ and I'm fairly sure is illegal in C.
At least gcc chucks a fit:

james@aeir ~ $ gcc -std=c89 -x c - <<!
typedef char foo_t[48];
typedef struct {} foo_t;
int main() {return 0;}
!
<stdin>:2: error: conflicting types for ‘foo_t’
<stdin>:1: error: previous declaration of ‘foo_t’ was here

Thanks for the report none the less.

-- James

Other related posts: