[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lib/argp-ba.c: remove #ifdef
From: |
Bruno Haible |
Subject: |
Re: [PATCH] lib/argp-ba.c: remove #ifdef |
Date: |
Wed, 06 Jul 2022 00:02:23 +0200 |
Guilherme Janczak wrote:
> I intend to send this file to glibc to make gnulib and glibc source the
> same.
Some comment / justification is missing. Ulrich Drepper, in his paper
"How to write shared libraries" [1], wrote
"The compiler will take care of avoid-
ing the initializers. To achieve the best results even with
old compilers it is desirable to avoid explicit initializa-
tions with zero if possible."
Since you are apparently speculating on a new compiler, please tell
starting which version of GCC one can assume that (on ELF platforms)
const char *x = NULL;
produce code that is as good as
const char *x;
> +const char *argp_program_bug_address = 0;
Also, please don't use 0 to denote a null pointer. That is antiquated
style from the 1980ies.
Bruno
[1] https://akkadia.org/drepper/dsohowto.pdf