Paolo Bonzini <[EMAIL PROTECTED]> writes: > Simon Josefsson wrote: >> Paolo Bonzini <[EMAIL PROTECTED]> writes: >> >>>> But gl_WARN_INIT should also accept a VARIABLE argument, then? Or better, >>>> make gl_WARN_INIT automatic upon the first use of gl_WARN_ADD with the >>>> given VARIABLE? >>> You have a point; however, gl_WARN_INIT would then need a second >>> argument for the description too, and then the user can directly use >>> AC_ARG_VAR. >> >> For that reason, I'd be in favor of requiring a gl_WARN_INIT for each >> variable used. That might avoid strange effects due to typos too. > > I'm not sure all users want to use AC_ARG_VAR for every warning > variable.
Good point. Still, making it possible for users to use the same idiom to add all warning flags might be useful? That would allow something like: gl_WARN_INIT(WARN_CFLAGS, [C Compiler warning flags]) gl_WARN_INIT(WARN_FOO_CFLAGS, [Extra C Compiler warning flags for foo]) gl_WARN_ADD(-Wbar) gl_WARN_ADD(-Wfoo, WARN_FOO_CFLAGS) gl_WARN_ADD(-Wapa, WARN_OTHER_INTERNAL_CFLAGS) Maybe presence of a comment should decide whether to use AC_ARG_VAR on it? E.g. the first block would then be: gl_WARN_INIT(WARN_CFLAGS, [C Compiler warning flags]) gl_WARN_INIT(WARN_FOO_CFLAGS, [Extra C Compiler warning flags for foo]) gl_WARN_INIT(WARN_OTHER_INTERNAL_CFLAGS) The gl_WARN_INIT code would invoke AC_ARG_VAR on the first and second variable, but not the last. /Simon