https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122312

Harald van Dijk <harald at gigawatt dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |harald at gigawatt dot nl

--- Comment #2 from Harald van Dijk <harald at gigawatt dot nl> ---
This example looks more complicated than it needs to be, it looks like the
nested function is only used to attempt implicit conversion to the correct fake
parameter type. There are other ways that that can be done that do not involve
additional functions, e.g.:

  #define my_strtol_(QChar, s_, endp_, base_) \
  ({                                          \
      QChar *s = s_;                          \
      QChar **endp = endp_;                   \
      int base = base_;                       \
      strtol(s, (char **) endp, base);        \
  })

  #define my_strtol(s, endp, base)  my_strtol_(QChar_of(s), s, endp, base)

Is there a case where this cannot be used and a nested function would be
required and this new extension would improve things?

Reply via email to