[metadata]
id = "FIO50-C"
type = "recommendation"
category = "FIO"
number = 50
title = "PP. Do not alternately input and output from a file stream without an intervening positioning call"
description = """
The C++ Standard, [filebuf], paragraph 2 [ISO/IEC 14882-2014], states the
following: The C Standard, subclause 7.19.5.3, paragraph 6 [ISO/IEC 9899:1999],
places the following restrictions onFILEobjects opened for both reading and
writing: Consequently, the following scenarios can result inundefined behavior:
"""
severity = "Low"
likelihood = "Likely"
priority = "P6"
level = "L2"
cert_version = "2016 Edition (Wiki)"
last_modified = "Jul 02, 2025"
[rules.cert_c.FIO50-C]
enabled = true
[references]
wiki = "https://wiki.sei.cmu.edu/confluence/display/cplusplus/FIO50-CPP.+Do+not+alternately+input+and+output+from+a+file+stream+without+an+intervening+positioning+call"