Hacker News new | past | comments | ask | show | jobs | submit login

Anyone else getting compile errors with the latest clang on mountain lion?

num2int.c:82:21: error: expected ')'

    sprintf(buf, "%"PRI_LL_PREFIX"d", NUM2LL(num));

                    ^



Is that even valid C code?


Yes, if PRI_LL_PREFIX expands to a string literal, the literals get merged together.


Ruby supports this too but it will be removed in the future (3.0). The preview doesn't show a warning but 2.0 will.

Source: https://bugs.ruby-lang.org/issues/6265

Btw, PRI_LL_PREFIX is defined in Ruby's config.h.


Not as written, but it's possible that PRI_LL_PREFIX is some sort of macro expanding to a string (similar to PRIi64 which is standard C).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: