mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
mwalkiewicz has joined #hpy
mwalkiewicz has quit [Remote host closed the connection]
<antocuni> arigato: in hpy commit 2ba682b (in the very early days) you wrote:
<antocuni> #define HPyAPI_FUNC(restype) __attribute__((unused)) static inline restype
<antocuni> the __attribute__((unused)) survived until today, but only in the cpython ABI mode. The question is: why was it needed?
<antocuni> in theory, if the function is marked as static inline, the compiler should already know that it might be unused and doesn't emit any warning
<antocuni> do you have any clue?
<antocuni> ah, this is interesting: it seems that clang emits an unused function warning even if it's a static inline, but ONLY if the function is defined in a .c file. If it's defined in a .h file which is #included, no warning is emitted (with clang-7)
<Hodgestar> antocuni: Another "__attribute__((unused)) static inline" was added by mattip to HPyAPI_UNUSED in hpy/devel/include/common/hpytype.h more recently, and I think that was perhaps because of compilation errors on Windows (or at least I think it was added during the fixes for Windows).
<Hodgestar> Any maybe clang too?
<Hodgestar> Scratch those comments, mattip was just updating those lines. :/
<Hodgestar> Doh.
<antocuni> maybe some older version of gcc/clang did emit a warning
<antocuni> I suppose it doesn't hurt to keep it, but I was curious
<antocuni> Hodgestar: btw, I'm working on a refactoring/cleanup of our headers, which are currently a mess: https://github.com/hpyproject/hpy/pull/225
<Hodgestar> antocuni: I saw. I will look in a bit.
<antocuni> no hurry, it's not completed yet
<Hodgestar> Maybe __attribute__((unused)) is just more explicit? GCC's unused static inlines are fine rule seems useful but also a bit obscure.
<antocuni> well, to me it's the only reasonable rule
<antocuni> static inline functions are very often put in header files
<antocuni> so they would generate warnings in all c files which include them
<Hodgestar> I agree it's reasonable, that doesn't mean that people reading "static inline" also immediately think "oh, and this will also result in it not being an error if the function isn't used".
<Hodgestar> antocuni: Re header refactor: Could you add a short note to the PR on what the plan is for the new shape of the headers?
<antocuni> yes sure, I'll write when I'm done
<Hodgestar> antocuni: And thank you for refactoring them -- they definitely got very messy!
<antocuni> I opened the PR mostly to run tests
<antocuni> Hodgestar: PR 225 is ready for review :)
<antocuni> also, in the last call we talked about refactoring HPyContext. I opened an issue for a potential API change: https://github.com/hpyproject/hpy/issues/226
<Hodgestar> Tx.