lua-users home
lua-l archive

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


In case anyone needs to compile luajit with clang (llvm C compiler), it
does work fine, modulo a minor fix for this bug
http://llvm.org/bugs/show_bug.cgi?id=8703

It is no faster (or slower) than gcc as expected.

It does give a few warnings (I do like its error messages better than
gcc's)

CC        lj_tab.o
lj_tab.c:206:20: warning: use of logical && with constant operand;
switch to bitwise & or remove constant [-Wconstant-logical-operand]
  if (t->asize > 0 && LJ_MAX_COLOSIZE && t->colo <= 0)
                   ^  ~~~~~~~~~~~~~~~
1 warning generated.
lj_tab.c:206:20: warning: use of logical && with constant operand;
switch to bitwise & or remove constant [-Wconstant-logical-operand]
  if (t->asize > 0 && LJ_MAX_COLOSIZE && t->colo <= 0)
                   ^  ~~~~~~~~~~~~~~~
1 warning generated.


CC        lj_record.o
lj_record.c:559:5: warning: expression result unused [-Wunused-value]
    getslot(J, func+i);  /* Ensure func and all args have a reference.
*/
    ^~~~~~~~~~~~~~~~~~
lj_record.c:150:50: note: instantiated from:
#define getslot(J, s)   (J->base[(s)] ? J->base[(s)] : sload(J,
(int32_t)(s)))
                                                ~~~^
lj_record.c:637:5: warning: expression result unused [-Wunused-value]
    getslot(J, rbase+i);  /* Ensure all results have a reference. */
    ^~~~~~~~~~~~~~~~~~~
lj_record.c:150:50: note: instantiated from:
#define getslot(J, s)   (J->base[(s)] ? J->base[(s)] : sload(J,
(int32_t)(s)))
                                                ~~~^
2 warnings generated.
lj_record.c:559:5: warning: expression result unused [-Wunused-value]
    getslot(J, func+i);  /* Ensure func and all args have a reference.
*/
    ^~~~~~~~~~~~~~~~~~
lj_record.c:150:50: note: instantiated from:
#define getslot(J, s)   (J->base[(s)] ? J->base[(s)] : sload(J,
(int32_t)(s)))
                                                ~~~^
lj_record.c:637:5: warning: expression result unused [-Wunused-value]
    getslot(J, rbase+i);  /* Ensure all results have a reference. */
    ^~~~~~~~~~~~~~~~~~~
lj_record.c:150:50: note: instantiated from:
#define getslot(J, s)   (J->base[(s)] ? J->base[(s)] : sload(J,
(int32_t)(s)))
                                                ~~~^
2 warnings generated.