Collin Funk [2026-11-06 19:42 -0800] wrote:

> +#  define _GL_ATTRIBUTE_ACCESS_READ_ONLY(args) \
> +     __attribute__ ((__access__ (__read_only__, args)))

I don't think this supports the 2-argument case where the optional
size-index is included, right?

  In file included from src/foo.c:18:
  src/foo.h:85:33: warning: left-hand operand of comma
   expression has no effect [-Wunused-value]
     85 |   ATTRIBUTE_ACCESS_READ_ONLY ((3, 2)) \
        |                                 ^
  ./src/config.h:1083:49: note: in definition of macro
   '_GL_ATTRIBUTE_ACCESS_READ_ONLY'
   1083 |      __attribute__ ((__access__ (__read_only__, args)))
        |                                                 ^~~~
  src/foo.h:85:3: note: in expansion of macro
   'ATTRIBUTE_ACCESS_READ_ONLY'
     85 |   ATTRIBUTE_ACCESS_READ_ONLY ((3, 2)) \
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks,
-- 
Basil

Reply via email to