lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


GCC on Mac is of low priority on Apple's radar. Maybe time to change
the default compiler in make to clang for Mac OS X.

2013/5/4 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
> This also works but I still don't know why it should be necessary:
>
> static int aux_close (lua_State *L) {
>   LStream *p = tolstream(L);
>   lua_CFunction cf = p->closef;
>   int rc = (cf)(L);  /* close it */
>   p->closef = NULL;  /* mark stream as closed */
>   return rc;
> }
>
> It seems to be an optimization problem because the original code below
> works fine with -O0.
>
> static int aux_close (lua_State *L) {
>   LStream *p = tolstream(L);
>   lua_CFunction cf = p->closef;
>   p->closef = NULL;  /* mark stream as closed */
>   return (*cf)(L);  /* close it */
> }
>