This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Sequence points in fscanf
- From: Martin Sebor <msebor at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, libc-help <libc-help at sourceware dot org>
- Date: Tue, 17 Feb 2015 09:40:53 -0700
- Subject: Re: Sequence points in fscanf
- Authentication-results: sourceware.org; auth=none
- References: <54E36962 dot 6000308 at redhat dot com>
On 02/17/2015 09:16 AM, Florian Weimer wrote:
Is there a sequence point between the assignments for the individual
format specifiers? I think there is not (in C11). Does this trigger
undefined behavior if application code uses the same object to store
multiple format conversion results?
Quoting from 7.21.6 Formatted input/output functions, paragraph
1:
The formatted input/output functions shall behave as if there
is a sequence point after the actions associated with each
specifier. 274)
Footnote 274) The fprintf functions perform writes to memory
for the %n specifier.
Martin