This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] mention disabling GCC built-ins for customization
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 13 Jun 2018 22:35:43 +0200
- Subject: Re: [PATCH] mention disabling GCC built-ins for customization
- References: <2f2f96d3-5487-f791-8554-310beae0721b@gmail.com>
* Martin Sebor:
> @strong{Portability Note:} The ability to extend the syntax of
> @code{printf} template strings is a GNU extension. ISO standard C has
> -nothing similar.
> +nothing similar. When using the GNU C compiler or any other compiler
> +that interprets calls to standard I/O functions according to the rules
> +of the language standard it is necessary to disable such handling by
> +the appropriate compiler option. Otherwise the behavior of a program
> +that relies on the extension is undefined.
Aren't there ISO extensions to C which define additional format
specifiers which GCC knows nothing about? So maybe it makes more
sense to say that if the application uses format specifiers not known
by GCC, behavior is undefined (unless the compiler option is used).