> diff --git a/lib/explicit_bzero.c b/lib/explicit_bzero.c
> index 489732791..bb52d11de 100644
> --- a/lib/explicit_bzero.c
> +++ b/lib/explicit_bzero.c
> @@ -56,9 +56,13 @@ explicit_bzero (void *s, size_t len)
>    (void) memset_s (s, len, '\0', len);
>  #else
>    memset (s, '\0', len);
> -# if defined __GNUC__ && !defined __clang__
> +#if defined __GNUC__
> +# if !defined __clang__
>    /* Compiler barrier.  */
>    asm volatile ("" ::: "memory");
> +# else
> +   /* https://bugs.llvm.org/show_bug.cgi?id=15495#c11 */
> +  __asm__ volatile("" : : "g"(s) : "memory");
>  # endif
>  #endif
>  }

It produces a compilation error:

gcc -DHAVE_CONFIG_H -I. -I../../gllib -I..  -DGNULIB_STRICT_CHECKING=1 -Wall  
-g -O2 -MT explicit_bzero.o -MD -MP -MF .deps/explicit_bzero.Tpo -c -o 
explicit_bzero.o ../../gllib/explicit_bzero.c
../../gllib/explicit_bzero.c:51:0: error: unterminated #else
 #if defined _WIN32 && !defined __CYGWIN__
 ^

This is precisely why we use spaces between '#' and 'if'/'else', to
highlight the indentation level.

Also, the comment '/* Compiler barrier.  */' applies also to the #else
branch, right? Then it should be place one line above.

Also, when you reference a web page, please add a short summary of what
is contained in it, or what you use from it. Our source code will still
be used and maintained 10 or 20 years from now, and web pages often
disappear or move after 1 or 5 years.

Bruno


Reply via email to