[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Module with preprocessor utilities
From: |
Bruno Haible |
Subject: |
Re: Module with preprocessor utilities |
Date: |
Mon, 20 Jul 2020 18:55:15 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; ) |
Hi Marc,
> I was thinking of macros like P99_NARG or P99_FOR, which are
> non-trivial to write but can be very helpful to write practical user
> macros (e.g. macros with default arguments).
In order to avoid bloat, I would suggest to start with a particular
problem (e.g. macros with default arguments, or functions with default
arguments, or GL_COUNTER), and introduce only as much macrology as needed
to solve that particular problem.
> > 4) Portability.
> > If there's a compiler that doesn't grok the code, you need to provide
> > a reasonable workaround/fallback/replacement or drop the module entirely.
>
> Some functionality will be limited to C99, but this is true for some
> other modules as well, isn't it?
Yes. But it is something important to watch out, as not all compilers support
all of C99.
> An average user of Gnulib, however, may not want to think
> of how to write GL_CONCAT fool-proof or GL_COUNTER with support for
> specific compilers.
If you know of shortcomings of _GL_CONCAT, we need to determine whether we
should just document a limitation, or spend the necessary macro complexity
in order to fix it.
Bruno
- Module with preprocessor utilities, Marc Nieper-Wißkirchen, 2020/07/19
- Re: Module with preprocessor utilities, Paul Eggert, 2020/07/20
- Re: Module with preprocessor utilities, Marc Nieper-Wißkirchen, 2020/07/20
- Re: Module with preprocessor utilities, Bruno Haible, 2020/07/20
- Message not available
- Re: Module with preprocessor utilities, Bruno Haible, 2020/07/23
- Re: Module with preprocessor utilities, Florian Weimer, 2020/07/24
- Re: Module with preprocessor utilities, Marc Nieper-Wißkirchen, 2020/07/24
- Re: Module with preprocessor utilities, Florian Weimer, 2020/07/24
- Re: Module with preprocessor utilities, Marc Nieper-Wißkirchen, 2020/07/24
- Re: Module with preprocessor utilities, Florian Weimer, 2020/07/24