From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99376 invoked by alias); 13 Jun 2018 20:35:48 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 99360 invoked by uid 89); 13 Jun 2018 20:35:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy= X-HELO: albireo.enyo.de From: Florian Weimer To: Martin Sebor Cc: GNU C Library Subject: Re: [PATCH] mention disabling GCC built-ins for customization References: <2f2f96d3-5487-f791-8554-310beae0721b@gmail.com> Date: Wed, 13 Jun 2018 20:35:00 -0000 In-Reply-To: <2f2f96d3-5487-f791-8554-310beae0721b@gmail.com> (Martin Sebor's message of "Wed, 13 Jun 2018 12:19:00 -0600") Message-ID: <87vaam1l28.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-06/txt/msg00359.txt.bz2 * 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).