From 91d33b586d44056d2e496ae0aed408778dd760d7 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Mon, 17 Oct 2022 17:50:42 -0500 Subject: [PATCH] Fix various C99+ conformance issues and bugs in test cases. The main changes made to most tests are: *Declarations always include explicit types, not relying on implicit int. The declaration of main in most test programs is changed to be "int main (void) {...}", adding an explicit return type and a prototype. (There are still some non-prototyped functions, though.) *Functions are always declared before use, either by including a header or by providing a declaration for the specific function. The latter approach is usually used for printf, to avoid requiring ORCA/C to process stdio.h when compiling every test case (which might make test runs noticeably slower). *Make all return statements in non-void functions (e.g. main) return a value. *Avoid some instances of undefined behavior and type errors in printf and scanf calls. Several miscellaneous bugs are also fixed. There are still a couple test cases that intentionally rely on the C89 behavior, to ensure it still works. --- Tests/Conformance/C11.4.2.1.CC | 10 +++++----- Tests/Conformance/C13.1.0.1.CC | 6 ++++-- Tests/Conformance/C14.1.0.1.CC | 6 ++++-- Tests/Conformance/C14.2.0.1.CC | 6 ++++-- Tests/Conformance/C14.3.0.1.CC | 6 ++++-- Tests/Conformance/C14.4.0.1.CC | 6 ++++-- Tests/Conformance/C14.5.0.1.CC | 6 ++++-- Tests/Conformance/C14.6.0.1.CC | 6 ++++-- Tests/Conformance/C14.7.0.1.CC | 6 ++++-- Tests/Conformance/C14.8.0.1.CC | 4 ++-- Tests/Conformance/C14.9.0.1.CC | 6 ++++-- Tests/Conformance/C15.1.0.1.CC | 6 ++++-- Tests/Conformance/C15.2.0.1.CC | 6 ++++-- Tests/Conformance/C15.3.0.1.CC | 6 ++++-- Tests/Conformance/C15.5.0.1.CC | 6 ++++-- Tests/Conformance/C15.6.0.1.CC | 6 ++++-- Tests/Conformance/C15.7.0.1.CC | 6 ++++-- Tests/Conformance/C15.7.0.2.CC | 6 ++++-- Tests/Conformance/C15.8.0.1.CC | 6 ++++-- Tests/Conformance/C15.8.0.2.CC | 4 ++-- Tests/Conformance/C15.9.0.1.CC | 6 ++++-- Tests/Conformance/C16.1.0.1.CC | 12 +++++++----- Tests/Conformance/C16.4.0.1.CC | 14 ++++++++------ Tests/Conformance/C17.10.0.1.CC | 13 +++++++------ Tests/Conformance/C17.11.0.1.CC | 14 +++++++------- Tests/Conformance/C17.11.0.10.CC | 15 ++++++++------- Tests/Conformance/C17.11.0.11.CC | 21 +++++++++++---------- Tests/Conformance/C17.11.0.2.CC | 15 ++++++++------- Tests/Conformance/C17.11.0.3.CC | 15 ++++++++------- Tests/Conformance/C17.11.0.4.CC | 15 ++++++++------- Tests/Conformance/C17.11.0.5.CC | 27 ++++++++++++++------------- Tests/Conformance/C17.11.0.6.CC | 21 +++++++++++---------- Tests/Conformance/C17.11.0.7.CC | 21 +++++++++++---------- Tests/Conformance/C17.11.0.8.CC | 21 +++++++++++---------- Tests/Conformance/C17.11.0.9.CC | 21 +++++++++++---------- Tests/Conformance/C17.13.0.1.CC | 10 +++++----- Tests/Conformance/C17.14.0.1.CC | 10 +++++----- Tests/Conformance/C17.15.0.1.CC | 10 +++++----- Tests/Conformance/C17.16.0.1.CC | 10 +++++----- Tests/Conformance/C17.5.0.1.CC | 14 +++++++------- Tests/Conformance/C17.5.0.2.CC | 17 +++++++++-------- Tests/Conformance/C17.6.0.1.CC | 14 +++++++------- Tests/Conformance/C17.6.0.2.CC | 14 +++++++------- Tests/Conformance/C17.7.0.1.CC | 13 +++++++------ Tests/Conformance/C17.7.0.2.CC | 13 +++++++------ Tests/Conformance/C17.8.0.1.CC | 10 +++++----- Tests/Conformance/C17.8.0.10.CC | 6 +++--- Tests/Conformance/C17.8.0.11.CC | 6 +++--- Tests/Conformance/C17.8.0.12.CC | 6 +++--- Tests/Conformance/C17.8.0.13.CC | 12 ++++++------ Tests/Conformance/C17.8.0.14.CC | 13 +++++++------ Tests/Conformance/C17.8.0.15.CC | 6 +++--- Tests/Conformance/C17.8.0.16.CC | 19 ++++++++++--------- Tests/Conformance/C17.8.0.17.CC | 8 ++++---- Tests/Conformance/C17.8.0.18.CC | 8 ++++---- Tests/Conformance/C17.8.0.19.CC | 8 ++++---- Tests/Conformance/C17.8.0.2.CC | 10 +++++----- Tests/Conformance/C17.8.0.20.CC | 8 ++++---- Tests/Conformance/C17.8.0.21.CC | 14 +++++++------- Tests/Conformance/C17.8.0.22.CC | 15 ++++++++------- Tests/Conformance/C17.8.0.23.CC | 8 ++++---- Tests/Conformance/C17.8.0.24.CC | 21 +++++++++++---------- Tests/Conformance/C17.8.0.3.CC | 10 +++++----- Tests/Conformance/C17.8.0.4.CC | 10 +++++----- Tests/Conformance/C17.8.0.5.CC | 16 ++++++++-------- Tests/Conformance/C17.8.0.6.CC | 17 +++++++++-------- Tests/Conformance/C17.8.0.7.CC | 10 +++++----- Tests/Conformance/C17.8.0.8.CC | 23 ++++++++++++----------- Tests/Conformance/C17.8.0.9.CC | 6 +++--- Tests/Conformance/C17.9.0.1.CC | 12 ++++++------ Tests/Conformance/C18.1.0.1.CC | 15 +++++++++------ Tests/Conformance/C18.3.0.1.CC | 11 +++++++---- Tests/Conformance/C19.1.0.1.CC | 6 ++++-- Tests/Conformance/C19.10.0.1.CC | 6 ++++-- Tests/Conformance/C19.2.0.1.CC | 6 ++++-- Tests/Conformance/C19.3.0.1.CC | 6 ++++-- Tests/Conformance/C19.4.0.1.CC | 6 ++++-- Tests/Conformance/C19.5.0.1.CC | 6 ++++-- Tests/Conformance/C19.6.0.1.CC | 6 ++++-- Tests/Conformance/C19.7.0.1.CC | 6 ++++-- Tests/Conformance/C19.8.0.1.CC | 6 ++++-- Tests/Conformance/C19.9.0.1.CC | 6 ++++-- Tests/Conformance/C2.1.0.1.CC | 7 +++++-- Tests/Conformance/C2.1.0.2.CC | 8 ++++++-- Tests/Conformance/C2.1.0.3.CC | 6 ++++-- Tests/Conformance/C2.1.0.4.CC | 8 ++++++-- Tests/Conformance/C2.1.1.1.CC | 6 ++++-- Tests/Conformance/C2.1.1.2.CC | 9 +++++++-- Tests/Conformance/C2.1.2.1.CC | 4 +++- Tests/Conformance/C2.1.2.2.CC | 7 +++++-- Tests/Conformance/C2.1.2.3.CC | 2 +- Tests/Conformance/C2.2.0.1.CC | 5 ++++- Tests/Conformance/C2.2.0.2.CC | 5 ++++- Tests/Conformance/C2.2.0.3.CC | 5 ++++- Tests/Conformance/C2.2.0.4.CC | 6 +++++- Tests/Conformance/C2.4.0.1.CC | 5 ++++- Tests/Conformance/C2.4.0.2.CC | 5 ++++- Tests/Conformance/C2.5.0.1.CC | 7 +++++-- Tests/Conformance/C2.5.0.2.CC | 7 +++++-- Tests/Conformance/C2.5.0.3.CC | 7 +++++-- Tests/Conformance/C2.5.0.4.CC | 7 +++++-- Tests/Conformance/C2.5.0.5.CC | 7 +++++-- Tests/Conformance/C2.5.0.6.CC | 7 +++++-- Tests/Conformance/C2.5.0.7.CC | 7 +++++-- Tests/Conformance/C2.5.0.8.CC | 6 ++++-- Tests/Conformance/C2.6.0.1.CC | 8 ++++++-- Tests/Conformance/C2.6.0.2.CC | 6 +++++- Tests/Conformance/C2.6.0.3.CC | 5 ++++- Tests/Conformance/C2.6.0.4.CC | 5 ++++- Tests/Conformance/C2.6.0.5.CC | 5 ++++- Tests/Conformance/C2.7.1.1.CC | 7 +++++-- Tests/Conformance/C2.7.1.2.CC | 7 +++++-- Tests/Conformance/C2.7.1.3.CC | 7 +++++-- Tests/Conformance/C2.7.1.4.CC | 7 +++++-- Tests/Conformance/C2.7.1.5.CC | 7 +++++-- Tests/Conformance/C2.7.1.6.CC | 7 +++++-- Tests/Conformance/C2.7.1.7.CC | 7 +++++-- Tests/Conformance/C2.7.1.8.CC | 7 +++++-- Tests/Conformance/C2.7.2.1.CC | 6 ++++-- Tests/Conformance/C2.7.2.2.CC | 6 ++++-- Tests/Conformance/C2.7.2.3.CC | 6 ++++-- Tests/Conformance/C2.7.3.1.CC | 7 +++++-- Tests/Conformance/C2.7.3.2.CC | 7 +++++-- Tests/Conformance/C2.7.4.1.CC | 9 +++++++-- Tests/Conformance/C2.7.4.2.CC | 9 +++++++-- Tests/Conformance/C2.7.4.3.CC | 8 ++++++-- Tests/Conformance/C2.7.4.4.CC | 4 +++- Tests/Conformance/C2.7.7.1.CC | 7 +++++-- Tests/Conformance/C2.7.7.2.CC | 9 +++++++-- Tests/Conformance/C20.1.0.1.CC | 6 ++++-- Tests/Conformance/C20.5.0.1.CC | 6 ++++-- Tests/Conformance/C21.1.0.2.CC | 4 +++- Tests/Conformance/C21.4.0.1.CC | 6 ++++-- Tests/Conformance/C22.5.0.1.CC | 11 ++++++++--- Tests/Conformance/C23.1.0.1.CC | 6 ++++-- Tests/Conformance/C23.2.0.1.CC | 9 ++++++--- Tests/Conformance/C23.3.0.1.CC | 7 +++++-- Tests/Conformance/C23.4.0.1.CC | 6 ++++-- Tests/Conformance/C23.5.0.1.CC | 6 ++++-- Tests/Conformance/C24.0.1.CC | 4 ++-- Tests/Conformance/C24.0.3.CC | 2 +- Tests/Conformance/C25.0.1.CC | 4 ++-- Tests/Conformance/C25.0.10.CC | 4 ++-- Tests/Conformance/C25.0.11.CC | 4 ++-- Tests/Conformance/C25.0.12.CC | 4 ++-- Tests/Conformance/C25.0.13.CC | 4 ++-- Tests/Conformance/C25.0.14.CC | 4 ++-- Tests/Conformance/C25.0.15.CC | 4 ++-- Tests/Conformance/C25.0.16.CC | 4 ++-- Tests/Conformance/C25.0.17.CC | 4 ++-- Tests/Conformance/C25.0.18.CC | 4 ++-- Tests/Conformance/C25.0.19.CC | 4 ++-- Tests/Conformance/C25.0.2.CC | 4 ++-- Tests/Conformance/C25.0.20.CC | 4 ++-- Tests/Conformance/C25.0.21.CC | 4 ++-- Tests/Conformance/C25.0.22.CC | 4 ++-- Tests/Conformance/C25.0.23.CC | 4 ++-- Tests/Conformance/C25.0.24.CC | 4 ++-- Tests/Conformance/C25.0.25.CC | 4 ++-- Tests/Conformance/C25.0.26.CC | 2 +- Tests/Conformance/C25.0.3.CC | 4 ++-- Tests/Conformance/C25.0.4.CC | 4 ++-- Tests/Conformance/C25.0.5.CC | 4 ++-- Tests/Conformance/C25.0.6.CC | 4 ++-- Tests/Conformance/C25.0.7.CC | 4 ++-- Tests/Conformance/C25.0.8.CC | 4 ++-- Tests/Conformance/C25.0.9.CC | 4 ++-- Tests/Conformance/C26.0.1.CC | 2 +- Tests/Conformance/C3.3.0.1.CC | 9 +++++++-- Tests/Conformance/C3.3.1.1.CC | 10 +++++++--- Tests/Conformance/C3.3.2.1.CC | 6 ++++-- Tests/Conformance/C3.3.3.1.CC | 6 ++++-- Tests/Conformance/C3.3.4.1.CC | 8 ++++++-- Tests/Conformance/C3.3.5.1.CC | 6 ++++-- Tests/Conformance/C3.3.6.1.CC | 6 ++++-- Tests/Conformance/C3.3.8.1.CC | 8 ++++++-- Tests/Conformance/C3.3.9.1.CC | 12 +++++++----- Tests/Conformance/C3.5.1.1.CC | 6 ++++-- Tests/Conformance/C3.5.1.2.CC | 6 ++++-- Tests/Conformance/C3.5.1.3.CC | 6 ++++-- Tests/Conformance/C3.5.1.4.CC | 6 ++++-- Tests/Conformance/C3.5.1.5.CC | 6 ++++-- Tests/Conformance/C3.5.2.1.CC | 4 +++- Tests/Conformance/C3.5.2.2.CC | 4 +++- Tests/Conformance/C3.5.2.3.CC | 4 +++- Tests/Conformance/C3.5.2.4.CC | 4 +++- Tests/Conformance/C3.5.3.1.CC | 6 ++++-- Tests/Conformance/C3.5.4.1.CC | 6 ++++-- Tests/Conformance/C3.5.4.2.CC | 8 +++++--- Tests/Conformance/C4.2.1.1.CC | 8 +++++--- Tests/Conformance/C4.2.2.1.CC | 6 ++++-- Tests/Conformance/C4.2.4.1.CC | 8 ++++++-- Tests/Conformance/C4.2.5.1.CC | 6 ++++-- Tests/Conformance/C4.3.0.1.CC | 8 +++++--- Tests/Conformance/C4.3.0.2.CC | 6 ++++-- Tests/Conformance/C4.4.2.1.CC | 4 +++- Tests/Conformance/C4.5.2.1.CC | 6 ++++-- Tests/Conformance/C4.5.2.2.CC | 6 ++++-- Tests/Conformance/C4.5.2.3.CC | 4 +++- Tests/Conformance/C4.5.3.1.CC | 6 ++++-- Tests/Conformance/C4.5.3.2.CC | 4 +++- Tests/Conformance/C4.5.3.3.CC | 6 ++++-- Tests/Conformance/C4.5.3.4.CC | 4 +++- Tests/Conformance/C4.5.4.1.CC | 4 ++-- Tests/Conformance/C4.5.4.2.CC | 4 ++-- Tests/Conformance/C4.6.1.1.CC | 6 ++++-- Tests/Conformance/C4.6.1.2.CC | 6 ++++-- Tests/Conformance/C4.6.2.1.CC | 6 ++++-- Tests/Conformance/C4.6.2.2.CC | 6 ++++-- Tests/Conformance/C4.6.3.1.CC | 6 ++++-- Tests/Conformance/C4.6.3.2.CC | 6 ++++-- Tests/Conformance/C4.6.4.1.CC | 9 +++++---- Tests/Conformance/C4.6.4.2.CC | 5 +++-- Tests/Conformance/C4.6.4.3.CC | 2 +- Tests/Conformance/C4.6.5.1.CC | 6 ++++-- Tests/Conformance/C4.6.6.1.CC | 5 +++-- Tests/Conformance/C4.6.6.2.CC | 9 +++++---- Tests/Conformance/C4.6.7.1.CC | 6 ++++-- Tests/Conformance/C6.2.3.1.CC | 5 +++-- Tests/Conformance/C6.2.3.2.CC | 5 +++-- Tests/Conformance/C6.2.3.3.CC | 5 +++-- Tests/Conformance/C6.2.3.4.CC | 5 +++-- Tests/Conformance/C6.2.3.5.CC | 5 +++-- Tests/Conformance/C7.10.0.1.CC | 10 +++++----- Tests/Conformance/C7.4.1.1.CC | 4 ++-- Tests/Conformance/C7.4.4.1.CC | 4 ++-- Tests/Conformance/C7.4.5.1.CC | 4 ++-- Tests/Conformance/C7.5.1.1.CC | 4 ++-- Tests/Conformance/C7.5.1.2.CC | 4 ++-- Tests/Conformance/C7.5.1.3.CC | 4 ++-- Tests/Conformance/C7.5.1.4.CC | 4 ++-- Tests/Conformance/C7.5.1.5.CC | 4 ++-- Tests/Conformance/C7.5.1.6.CC | 4 ++-- Tests/Conformance/C7.5.5.1.CC | 4 ++-- Tests/Conformance/C7.5.8.1.CC | 4 ++-- Tests/Conformance/C7.5.9.1.CC | 4 ++-- Tests/Conformance/C7.6.1.1.CC | 4 ++-- Tests/Conformance/C7.6.1.2.CC | 4 ++-- Tests/Conformance/C7.6.1.3.CC | 4 ++-- Tests/Conformance/C7.6.2.1.CC | 4 ++-- Tests/Conformance/C7.6.3.1.CC | 4 ++-- Tests/Conformance/C7.6.4.1.CC | 4 ++-- Tests/Conformance/C7.6.6.1.CC | 4 ++-- Tests/Conformance/C7.6.7.1.CC | 4 ++-- Tests/Conformance/C7.6.8.1.CC | 4 ++-- Tests/Conformance/C7.7.1.1.CC | 4 ++-- Tests/Conformance/C7.7.2.1.CC | 4 ++-- Tests/Conformance/C7.8.0.1.CC | 4 ++-- Tests/Conformance/C7.9.2.1.CC | 4 ++-- Tests/Conformance/C7.9.2.2.CC | 4 ++-- Tests/Conformance/C7.9.2.3.CC | 4 ++-- Tests/Conformance/C7.9.2.4.CC | 4 ++-- Tests/Conformance/C7.9.2.5.CC | 4 ++-- Tests/Conformance/C7.9.2.6.CC | 4 ++-- Tests/Conformance/C7.9.2.7.CC | 4 ++-- Tests/Conformance/C7.9.2.8.CC | 4 ++-- Tests/Conformance/C7.9.2.9.CC | 2 +- Tests/Conformance/C8.7.0.1.CC | 4 ++-- Tests/Conformance/C8.7.0.2.CC | 2 +- Tests/Conformance/C8.7.0.3.CC | 2 +- Tests/Conformance/C8.7.0.4.CC | 2 +- Tests/Conformance/C8.7.0.5.CC | 2 +- Tests/Conformance/C8.7.0.6.CC | 2 +- Tests/Conformance/C8.8.0.1.CC | 4 ++-- Tests/Conformance/C9.2.0.1.CC | 4 ++-- Tests/Conformance/C9.3.0.1.CC | 4 ++-- Tests/Conformance/C9.5.0.1.CC | 5 +++-- Tests/Conformance/C9.5.0.2.CC | 4 ++-- Tests/Conformance/C9.7.0.1.CC | 4 ++-- Tests/Deviance/D2.1.0.1.CC | 2 +- Tests/Deviance/D2.2.0.2.CC | 5 ++++- Tests/Deviance/D2.4.0.1.CC | 5 ++++- Tests/Deviance/D2.5.0.1.CC | 5 ++++- Tests/Deviance/D2.5.0.2.CC | 5 ++++- Tests/Deviance/D2.7.1.1.CC | 5 ++++- Tests/Deviance/D2.7.1.2.CC | 5 ++++- Tests/Deviance/D2.7.2.1.CC | 5 ++++- Tests/Deviance/D2.7.3.1.CC | 5 ++++- Tests/Deviance/D2.7.3.3.CC | 5 ++++- Tests/Deviance/D2.7.4.1.CC | 4 +++- Tests/Deviance/D2.7.4.4.CC | 11 +++++++---- Tests/Deviance/D25.0.1.CC | 2 +- Tests/Deviance/D25.0.2.CC | 2 +- Tests/Deviance/D3.3.1.1.CC | 4 +++- Tests/Deviance/D3.3.10.1.CC | 4 +++- Tests/Deviance/D3.3.2.1.CC | 4 +++- Tests/Deviance/D3.3.3.1.CC | 4 +++- Tests/Deviance/D3.3.4.1.CC | 4 +++- Tests/Deviance/D3.3.5.1.CC | 4 +++- Tests/Deviance/D3.4.0.1.CC | 4 +++- Tests/Deviance/D3.5.1.1.CC | 4 +++- Tests/Deviance/D3.5.2.1.CC | 4 +++- Tests/Deviance/D3.5.3.1.CC | 4 +++- Tests/Deviance/D3.5.5.1.CC | 4 +++- Tests/Deviance/D4.2.1.1.CC | 4 +++- Tests/Deviance/D4.2.2.1.CC | 4 +++- Tests/Deviance/D4.2.3.1.CC | 2 +- Tests/Deviance/D4.2.5.1.CC | 4 +++- Tests/Deviance/D4.2.9.1.CC | 4 +++- Tests/Deviance/D4.3.0.1.CC | 4 +++- Tests/Deviance/D4.4.1.1.CC | 4 +++- Tests/Deviance/D4.5.3.1.CC | 8 +++++--- Tests/Deviance/D4.6.0.1.CC | 4 +++- Tests/Deviance/D4.6.0.2.CC | 4 +++- Tests/Deviance/D4.6.1.1.CC | 4 +++- Tests/Deviance/D4.6.2.1.CC | 4 +++- Tests/Deviance/D4.6.3.1.CC | 4 +++- Tests/Deviance/D4.6.4.1.CC | 4 +++- Tests/Deviance/D4.6.5.1.CC | 4 +++- Tests/Deviance/D4.6.6.1.CC | 4 +++- Tests/Deviance/D4.6.7.1.CC | 4 +++- Tests/Deviance/D4.6.8.1.CC | 4 +++- Tests/Deviance/D7.1.1.1.CC | 4 +++- Tests/Deviance/D7.5.4.1.CC | 2 +- Tests/Deviance/D7.6.1.1.CC | 2 +- Tests/Deviance/D7.6.3.1.CC | 2 +- Tests/Deviance/D7.6.4.1.CC | 2 +- Tests/Deviance/D7.6.6.1.CC | 2 +- Tests/Deviance/D7.6.7.1.CC | 2 +- Tests/Deviance/D7.6.8.1.CC | 2 +- Tests/Deviance/D8.7.0.1.CC | 2 +- Tests/Deviance/D8.8.0.1.CC | 2 +- Tests/Deviance/D9.2.0.1.CC | 2 +- Tests/Spec.Conform/SPC13.2.0.1.CC | 2 +- Tests/Spec.Conform/SPC13.4.0.1.CC | 4 +++- Tests/Spec.Conform/SPC17.16.0.1.CC | 5 +++-- Tests/Spec.Conform/SPC17.2.0.1.CC | 6 +++--- Tests/Spec.Conform/SPC17.2.0.2.CC | 4 ++-- Tests/Spec.Conform/SPC17.2.0.3.CC | 4 ++-- Tests/Spec.Conform/SPC17.3.0.1.CC | 14 +++++++------- Tests/Spec.Conform/SPC17.3.0.2.CC | 14 +++++++------- Tests/Spec.Conform/SPC17.3.0.3.CC | 12 ++++++------ Tests/Spec.Conform/SPC17.3.0.4.CC | 12 ++++++------ Tests/Spec.Conform/SPC17.3.0.5.CC | 12 ++++++------ Tests/Spec.Conform/SPC17.6.0.1.CC | 4 ++-- Tests/Spec.Conform/SPC17.7.0.1.CC | 2 +- Tests/Spec.Conform/SPC2.1.0.1.CC | 2 +- Tests/Spec.Conform/SPC20.2.0.1.CC | 6 ++++-- Tests/Spec.Conform/SPC21.1.0.1.CC | 4 +++- Tests/Spec.Conform/SPC21.2.0.1.CC | 2 +- Tests/Spec.Conform/SPC21.3.0.1.CC | 4 +++- Tests/Spec.Conform/SPC21.3.0.2.CC | 4 +++- Tests/Spec.Conform/SPC21.3.0.3.CC | 4 +++- Tests/Spec.Conform/SPC22.1.0.1.CC | 4 ++++ Tests/Spec.Conform/SPC23.2.0.1.CC | 7 +++++-- Tests/Spec.Conform/SPC25.0.1.CC | 4 ++-- Tests/Spec.Conform/SPC25.0.2.CC | 4 ++-- Tests/Spec.Conform/SPC3.3.4.1.CC | 4 +++- Tests/Spec.Conform/SPC3.4.0.1.CC | 2 ++ Tests/Spec.Conform/SPC3.6.0.1.CC | 2 +- Tests/Spec.Conform/SPC3.6.0.2.CC | 4 ++-- Tests/Spec.Conform/SPC3.6.0.3.CC | 6 +++++- Tests/Spec.Conform/SPC34028 | 2 +- Tests/Spec.Conform/SPC4.3.0.1.CC | 5 ++++- Tests/Spec.Conform/SPC4.3.1.1.CC | 6 ++++-- Tests/Spec.Conform/SPC4.4.1.1.CC | 4 +++- Tests/Spec.Conform/SPC4.5.2.1.CC | 2 +- Tests/Spec.Conform/SPC4.5.3.1.CC | 4 +++- Tests/Spec.Conform/SPC4.5.3.2.CC | 4 +++- Tests/Spec.Conform/SPC4.6.3.1.CC | 4 +++- Tests/Spec.Conform/SPC4.6.3.2.CC | 6 ++++-- Tests/Spec.Conform/SPC4.6.3.3.CC | 6 ++++-- Tests/Spec.Conform/SPC4.6.3.4.CC | 4 +++- Tests/Spec.Conform/SPC4.6.3.5.CC | 6 ++++-- Tests/Spec.Conform/SPC4.6.3.6.CC | 6 ++++-- Tests/Spec.Conform/SPC4311.EXEC | 1 - Tests/Spec.Conform/SPC4521.1.CC | 2 ++ Tests/Spec.Conform/SPC4531.1.CC | 2 ++ Tests/Spec.Conform/SPC4532.1.CC | 2 ++ Tests/Spec.Conform/SPC4631.1.CC | 2 ++ Tests/Spec.Conform/SPC4632.1.CC | 2 ++ Tests/Spec.Conform/SPC4633.1.CC | 2 ++ Tests/Spec.Conform/SPC4634.1.CC | 2 ++ Tests/Spec.Conform/UFILE1 | 2 +- Tests/Spec.Deviance/SPD17.2.0.1.CC | 4 ++-- Tests/Spec.Deviance/SPD17.2.0.2.CC | 4 ++-- Tests/Spec.Deviance/SPD17.2.0.3.CC | 4 ++-- Tests/Spec.Deviance/SPD17.2.0.4.CC | 4 ++-- Tests/Spec.Deviance/SPD17.2.0.5.CC | 4 ++-- Tests/Spec.Deviance/SPD17.2.0.7.CC | 4 ++-- Tests/Spec.Deviance/SPD17.3.0.1.CC | 6 +++--- Tests/Spec.Deviance/SPD17.3.0.2.CC | 10 +++++----- Tests/Spec.Deviance/SPD17.3.0.3.CC | 8 ++++---- Tests/Spec.Deviance/SPD17.5.0.1.CC | 4 ++-- Tests/Spec.Deviance/SPD17.5.0.2.CC | 6 +++--- Tests/Spec.Deviance/SPD17.6.0.1.CC | 4 ++-- Tests/Spec.Deviance/SPD17.6.0.2.CC | 4 ++-- Tests/Spec.Deviance/SPD17.6.0.3.CC | 4 ++-- Tests/Spec.Deviance/SPD17.7.0.1.CC | 4 ++-- 389 files changed, 1444 insertions(+), 928 deletions(-) diff --git a/Tests/Conformance/C11.4.2.1.CC b/Tests/Conformance/C11.4.2.1.CC index 45e3eb5..0b72263 100644 --- a/Tests/Conformance/C11.4.2.1.CC +++ b/Tests/Conformance/C11.4.2.1.CC @@ -6,18 +6,18 @@ struct foo { int i; - const j; - volatile k; + int const j; + volatile int k; } ; -main () +int main (void) { int i,j; j = 4; -i = (const) j; -i = (volatile) j; +i = (const int) j; +i = (int volatile) j; printf ("Passed Conformance Test 11.4.2.1\n"); } diff --git a/Tests/Conformance/C13.1.0.1.CC b/Tests/Conformance/C13.1.0.1.CC index 1d74359..8d79941 100644 --- a/Tests/Conformance/C13.1.0.1.CC +++ b/Tests/Conformance/C13.1.0.1.CC @@ -3,9 +3,11 @@ #include +int printf(const char *, ...); + extended e1 [800]; -main () +int main (void) { int i [10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int *i1 = i; @@ -28,7 +30,7 @@ main () goto Fail; printf ("Passed Conformance Test 13.1.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 13.1.0.1\n"); diff --git a/Tests/Conformance/C14.1.0.1.CC b/Tests/Conformance/C14.1.0.1.CC index 76e8029..7751884 100644 --- a/Tests/Conformance/C14.1.0.1.CC +++ b/Tests/Conformance/C14.1.0.1.CC @@ -3,7 +3,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j; char ch; @@ -141,7 +143,7 @@ main () } printf ("Passed Conformance Test 14.1.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 14.1.0.1\n"); diff --git a/Tests/Conformance/C14.2.0.1.CC b/Tests/Conformance/C14.2.0.1.CC index 0bb8930..e312d60 100644 --- a/Tests/Conformance/C14.2.0.1.CC +++ b/Tests/Conformance/C14.2.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j; char ch; @@ -54,7 +56,7 @@ main () goto Fail; printf ("Passed Conformance Test 14.2.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 14.2.0.1\n"); diff --git a/Tests/Conformance/C14.3.0.1.CC b/Tests/Conformance/C14.3.0.1.CC index c8b0ec6..7356bec 100644 --- a/Tests/Conformance/C14.3.0.1.CC +++ b/Tests/Conformance/C14.3.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j; char ch; @@ -80,7 +82,7 @@ main () printf ("Passed Conformance Test 14.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 14.3.0.1\n"); diff --git a/Tests/Conformance/C14.4.0.1.CC b/Tests/Conformance/C14.4.0.1.CC index 293c7d7..485cc65 100644 --- a/Tests/Conformance/C14.4.0.1.CC +++ b/Tests/Conformance/C14.4.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j; char ch; @@ -71,7 +73,7 @@ main () goto Fail; printf ("Passed Conformance Test 14.4.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 14.4.0.1\n"); diff --git a/Tests/Conformance/C14.5.0.1.CC b/Tests/Conformance/C14.5.0.1.CC index dae4f65..d296f10 100644 --- a/Tests/Conformance/C14.5.0.1.CC +++ b/Tests/Conformance/C14.5.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j; char ch; @@ -33,7 +35,7 @@ main () } printf ("Passed Conformance Test 14.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 14.5.0.1\n"); diff --git a/Tests/Conformance/C14.6.0.1.CC b/Tests/Conformance/C14.6.0.1.CC index 1d3f19b..3abca1d 100644 --- a/Tests/Conformance/C14.6.0.1.CC +++ b/Tests/Conformance/C14.6.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j; char ch; @@ -30,7 +32,7 @@ main () } printf ("Passed Conformance Test 14.6.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 14.6.0.1\n"); diff --git a/Tests/Conformance/C14.7.0.1.CC b/Tests/Conformance/C14.7.0.1.CC index 2f63882..c9d2753 100644 --- a/Tests/Conformance/C14.7.0.1.CC +++ b/Tests/Conformance/C14.7.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j; char ch; @@ -67,7 +69,7 @@ main () printf ("Passed Conformance Test 14.7.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 14.7.0.1\n"); diff --git a/Tests/Conformance/C14.8.0.1.CC b/Tests/Conformance/C14.8.0.1.CC index c2d5424..2b9c62d 100644 --- a/Tests/Conformance/C14.8.0.1.CC +++ b/Tests/Conformance/C14.8.0.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i, j; char ch; @@ -42,7 +42,7 @@ main () } printf ("Passed Conformance Test 14.8.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 14.8.0.1\n"); diff --git a/Tests/Conformance/C14.9.0.1.CC b/Tests/Conformance/C14.9.0.1.CC index 95a62e8..8131d8e 100644 --- a/Tests/Conformance/C14.9.0.1.CC +++ b/Tests/Conformance/C14.9.0.1.CC @@ -3,7 +3,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j; char ch; @@ -53,7 +55,7 @@ main () printf ("Passed Conformance Test 14.9.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 14.9.0.1\n"); diff --git a/Tests/Conformance/C15.1.0.1.CC b/Tests/Conformance/C15.1.0.1.CC index a9b33bb..3cdc9eb 100644 --- a/Tests/Conformance/C15.1.0.1.CC +++ b/Tests/Conformance/C15.1.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { char s1 [80] = "this is the first string argument"; char s2 [80] = ", and this is the second string argument!"; @@ -38,7 +40,7 @@ second string argument!")) printf ("Passed Conformance Test 15.1.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.1.0.1\n"); diff --git a/Tests/Conformance/C15.2.0.1.CC b/Tests/Conformance/C15.2.0.1.CC index 484f7d3..6ba0391 100644 --- a/Tests/Conformance/C15.2.0.1.CC +++ b/Tests/Conformance/C15.2.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i; @@ -32,7 +34,7 @@ main () goto Fail; printf ("Passed Conformance Test 15.2.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.2.0.1\n"); diff --git a/Tests/Conformance/C15.3.0.1.CC b/Tests/Conformance/C15.3.0.1.CC index ed54734..796ee4e 100644 --- a/Tests/Conformance/C15.3.0.1.CC +++ b/Tests/Conformance/C15.3.0.1.CC @@ -3,7 +3,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { char s1 [80] = "this is the first string argument"; char s2 [80] = ", and this is the second string argument!"; @@ -32,7 +34,7 @@ main () printf ("Passed Conformance Test 15.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.3.0.1\n"); diff --git a/Tests/Conformance/C15.5.0.1.CC b/Tests/Conformance/C15.5.0.1.CC index a02de2e..ca37dd7 100644 --- a/Tests/Conformance/C15.5.0.1.CC +++ b/Tests/Conformance/C15.5.0.1.CC @@ -4,7 +4,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { char s1 [80] = "this is the first string argument"; char *strPtr; @@ -55,7 +57,7 @@ main () goto Fail; printf ("Passed Conformance Test 15.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.5.0.1\n"); diff --git a/Tests/Conformance/C15.6.0.1.CC b/Tests/Conformance/C15.6.0.1.CC index d5cc965..b35d572 100644 --- a/Tests/Conformance/C15.6.0.1.CC +++ b/Tests/Conformance/C15.6.0.1.CC @@ -4,7 +4,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { char s1 [80] = "a b c d e f g h i j k : ' - _ + "; char *strPtr; @@ -72,7 +74,7 @@ main () printf ("Passed Conformance Test 15.6.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.6.0.1\n"); diff --git a/Tests/Conformance/C15.7.0.1.CC b/Tests/Conformance/C15.7.0.1.CC index 86b58cc..bf8b712 100644 --- a/Tests/Conformance/C15.7.0.1.CC +++ b/Tests/Conformance/C15.7.0.1.CC @@ -3,7 +3,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { char string [] = " this is the source string, a source string"; char *strPtr; @@ -18,7 +20,7 @@ main () goto Fail; printf ("Passed Conformance Test 15.7.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.7.0.1\n"); diff --git a/Tests/Conformance/C15.7.0.2.CC b/Tests/Conformance/C15.7.0.2.CC index 9f9e5e5..78bbbbf 100644 --- a/Tests/Conformance/C15.7.0.2.CC +++ b/Tests/Conformance/C15.7.0.2.CC @@ -3,7 +3,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { char string [] = " this is the source string, so creative! oh, yes"; char *strPtr; @@ -99,7 +101,7 @@ main () printf ("Passed Conformance Test 15.7.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.7.0.2\n"); diff --git a/Tests/Conformance/C15.8.0.1.CC b/Tests/Conformance/C15.8.0.1.CC index 53b730f..9689941 100644 --- a/Tests/Conformance/C15.8.0.1.CC +++ b/Tests/Conformance/C15.8.0.1.CC @@ -4,7 +4,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { double d1; char string [] = " -32767 0567 -3.4e+2 "; @@ -30,7 +32,7 @@ main () goto Fail; printf ("Passed Conformance Test 15.8.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.8.0.1\n"); diff --git a/Tests/Conformance/C15.8.0.2.CC b/Tests/Conformance/C15.8.0.2.CC index efd6f06..af4ad05 100644 --- a/Tests/Conformance/C15.8.0.2.CC +++ b/Tests/Conformance/C15.8.0.2.CC @@ -6,7 +6,7 @@ #include #include -void main (void) +int main (void) { long L1; unsigned long UL1; @@ -60,7 +60,7 @@ void main (void) goto Fail; printf ("Passed Conformance Test 15.8.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.8.0.2\n"); diff --git a/Tests/Conformance/C15.9.0.1.CC b/Tests/Conformance/C15.9.0.1.CC index 48849c1..1f8d8e2 100644 --- a/Tests/Conformance/C15.9.0.1.CC +++ b/Tests/Conformance/C15.9.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { double d1; int i; @@ -22,7 +24,7 @@ main () goto Fail; printf ("Passed Conformance Test 15.9.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 15.9.0.1\n"); diff --git a/Tests/Conformance/C16.1.0.1.CC b/Tests/Conformance/C16.1.0.1.CC index 9127490..772eb3b 100644 --- a/Tests/Conformance/C16.1.0.1.CC +++ b/Tests/Conformance/C16.1.0.1.CC @@ -5,7 +5,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { int i; char *rgn, *ptr1; @@ -37,7 +39,7 @@ main () if (ptr1 != string+14) goto Fail; - ptr1 = (char *) (memchr (string, 'Z', 88)); + ptr1 = (char *) (memchr (string, 'Z', sizeof(string))); if (ptr1 != NULL) goto Fail; @@ -56,13 +58,13 @@ main () printf ("Passed Conformance Test 16.1.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 16.1.0.1\n"); - return; + return 0; Fail1: printf ("Unable to allocate memory for Conformance Test 16.1.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C16.4.0.1.CC b/Tests/Conformance/C16.4.0.1.CC index ef74dbb..dd7f722 100644 --- a/Tests/Conformance/C16.4.0.1.CC +++ b/Tests/Conformance/C16.4.0.1.CC @@ -4,7 +4,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { char *rgn, *ptr1; @@ -17,20 +19,20 @@ main () if (ptr1 != rgn) goto Fail; - for (; rgn != ptr1; rgn++) + for (; rgn != ptr1 + 1024; rgn++) if (*rgn != 'a') goto Fail; - free (rgn); + free (ptr1); printf ("Passed Conformance Test 16.4.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 16.4.0.1\n"); - return; + return 0; Fail1: printf ("Unable to allocate memory for Conformance Test 16.4.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.10.0.1.CC b/Tests/Conformance/C17.10.0.1.CC index fb88c85..610c2b9 100644 --- a/Tests/Conformance/C17.10.0.1.CC +++ b/Tests/Conformance/C17.10.0.1.CC @@ -1,8 +1,9 @@ /* Conformance Test 17.10.0.1: Verification of fputs and puts */ #include +#include -main () +int main (void) { FILE *f1; int i,j; @@ -53,21 +54,21 @@ main () goto Fail2; printf ("Passed Conformance Test 17.10.0.1\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.10.0.1\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open input file for Conformance Test 17.10.0.1\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close input file for Conformance Test 17.10.0.1\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.10.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.1.CC b/Tests/Conformance/C17.11.0.1.CC index 7ab0e32..f94c9e2 100644 --- a/Tests/Conformance/C17.11.0.1.CC +++ b/Tests/Conformance/C17.11.0.1.CC @@ -4,7 +4,7 @@ #include #include -main () +int main (void) { FILE *f1; short i1; @@ -78,25 +78,25 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.1\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.1\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.1\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.1\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.1\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.10.CC b/Tests/Conformance/C17.11.0.10.CC index 3739492..d25ae22 100644 --- a/Tests/Conformance/C17.11.0.10.CC +++ b/Tests/Conformance/C17.11.0.10.CC @@ -2,8 +2,9 @@ /* g,G format codes */ #include +#include -main () +int main (void) { FILE *f1; int i; @@ -75,25 +76,25 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.10\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.10\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.10\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.10\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.10\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.10\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.11.CC b/Tests/Conformance/C17.11.0.11.CC index a1e2417..3ca6f9e 100644 --- a/Tests/Conformance/C17.11.0.11.CC +++ b/Tests/Conformance/C17.11.0.11.CC @@ -2,8 +2,9 @@ /* n and % format codes */ #include +#include -main () +int main (void) { FILE *f1; int i, i1, i2; @@ -30,21 +31,21 @@ main () /* Write formatted output as string to the output files and sstring. */ - i = fprintf (f1, "%% %hn %0+*.*le %s %% %ln N\n", &sh, i1, i2, e1, + i = fprintf (f1, "%% %hn %0+*.*Le %s %% %ln N\n", &sh, i1, i2, e1, "a string", &l1); if (i != 48) goto Fail; if ((sh != 3) || (l1 != 44)) /* check return values for n format */ goto Fail; - i = printf ("%% %hn %0+*.*le %s %% %ln N\n", &sh, i1, i2, e1, + i = printf ("%% %hn %0+*.*Le %s %% %ln N\n", &sh, i1, i2, e1, "a string", &l1); if (i != 48) goto Fail; if ((sh != 3) || (l1 != 44)) /* check return values for n format */ goto Fail; - i = sprintf (sstring, "%% %hn %0+*.*le %s %% %ln N\n", &sh, i1, i2, e1, + i = sprintf (sstring, "%% %hn %0+*.*Le %s %% %ln N\n", &sh, i1, i2, e1, "a string", &l1); if (i != 48) goto Fail; @@ -81,25 +82,25 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.11\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.11\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.11\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.11\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.11\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.11\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.2.CC b/Tests/Conformance/C17.11.0.2.CC index a253155..45e79f0 100644 --- a/Tests/Conformance/C17.11.0.2.CC +++ b/Tests/Conformance/C17.11.0.2.CC @@ -2,8 +2,9 @@ /* u format code */ #include +#include -main () +int main (void) { FILE *f1; int i, i1, i2; @@ -76,28 +77,28 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.2\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.2\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.2\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.2\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.2\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.2\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.3.CC b/Tests/Conformance/C17.11.0.3.CC index 7326e0e..13ff39c 100644 --- a/Tests/Conformance/C17.11.0.3.CC +++ b/Tests/Conformance/C17.11.0.3.CC @@ -2,8 +2,9 @@ /* o format code */ #include +#include -main () +int main (void) { FILE *f1; int i, i1, i2; @@ -75,25 +76,25 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.3\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.3\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.3\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.3\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.3\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.3\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.4.CC b/Tests/Conformance/C17.11.0.4.CC index b752505..872186b 100644 --- a/Tests/Conformance/C17.11.0.4.CC +++ b/Tests/Conformance/C17.11.0.4.CC @@ -2,8 +2,9 @@ /* x,X format codes */ #include +#include -main () +int main (void) { FILE *f1; int i, i1, i2; @@ -75,25 +76,25 @@ if (strcmp (sstring, " 0x000000ffff 0X0000FFFF 00ffffffff C\n")) goto Fail2; printf ("Passed Conformance Test 17.11.0.4\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.4\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.4\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.4\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.4\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.4\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.5.CC b/Tests/Conformance/C17.11.0.5.CC index 0c54162..749d926 100644 --- a/Tests/Conformance/C17.11.0.5.CC +++ b/Tests/Conformance/C17.11.0.5.CC @@ -2,8 +2,9 @@ /* c format code */ #include +#include -main () +int main (void) { FILE *f1; int i, i1, i2; @@ -28,18 +29,18 @@ main () /* Write formatted output as string to the output file. */ - i = fprintf (f1, " %#+ -010.10c %05.7hc %.6lc %+ *.*lc D\n", - ui1, ui1, ui2, i1, i2, 'd'); + i = fprintf (f1, " %+ -10c %5c %c %+ *c D\n", + ui1, ui1, ui2, i1, 'd'); if (i != 30) goto Fail; - i = printf (" %#+ -010.10c %05.7hc %.6lc %+ *.*lc D\n", - ui1, ui1, ui2, i1, i2, 'd'); + i = printf (" %+ -10c %5c %c %+ *c D\n", + ui1, ui1, ui2, i1, 'd'); if (i != 30) goto Fail; - i = sprintf (sstring, " %#+ -010.10c %05.7hc %.6lc %+ *.*lc D\n", - ui1, ui1, ui2, i1, i2, 'd'); + i = sprintf (sstring, " %+ -10c %5c %c %+ *c D\n", + ui1, ui1, ui2, i1, 'd'); if (i != 30) goto Fail; @@ -73,25 +74,25 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.5\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.5\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.5\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.5\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.5\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.5\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.6.CC b/Tests/Conformance/C17.11.0.6.CC index e0db182..24b9a6a 100644 --- a/Tests/Conformance/C17.11.0.6.CC +++ b/Tests/Conformance/C17.11.0.6.CC @@ -2,8 +2,9 @@ /* s format code */ #include +#include -main () +int main (void) { FILE *f1; int i, j, k; @@ -27,17 +28,17 @@ main () /* Write formatted output as string to the output files and sstring. */ - i = fprintf (f1, " %#+ -10.10s %015.7hs %*.*s %s E\n", + i = fprintf (f1, " %+ -10.10s %15.7s %*.*s %s E\n", arg1, arg1, j, k, arg2, "very short string"); if (i != 77) goto Fail; - i = printf (" %#+ -10.10s %015.7hs %*.*s %s E\n", + i = printf (" %+ -10.10s %15.7s %*.*s %s E\n", arg1, arg1, j, k, arg2, "very short string"); if (i != 77) goto Fail; - i = sprintf (sstring, " %#+ -10.10s %015.7hs %*.*s %s E\n", + i = sprintf (sstring, " %+ -10.10s %15.7s %*.*s %s E\n", arg1, arg1, j, k, arg2, "very short string"); if (i != 77) goto Fail; @@ -75,25 +76,25 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.6\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.6\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.6\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.6\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.6\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.6\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.7.CC b/Tests/Conformance/C17.11.0.7.CC index 48aaf9c..fc31410 100644 --- a/Tests/Conformance/C17.11.0.7.CC +++ b/Tests/Conformance/C17.11.0.7.CC @@ -2,8 +2,9 @@ /* p format code */ #include +#include -main () +int main (void) { FILE *f1; int i, j, k; @@ -27,17 +28,17 @@ main () /* Write formatted output as string to the output file. */ - i = fprintf (f1, " %#+ -10.10b %015.7hb %*.*b %b E\n", + i = fprintf (f1, " %#+ -10.10b %015.7b %*.*b %b E\n", arg1, arg1, j, k, arg2, "\pvery short string"); if (i != 77) goto Fail; - i = printf (" %#+ -10.10b %015.7hb %*.*b %b E\n", + i = printf (" %#+ -10.10b %015.7b %*.*b %b E\n", arg1, arg1, j, k, arg2, "\pvery short string"); if (i != 77) goto Fail; - i = sprintf (sstring, " %#+ -10.10b %015.7hb %*.*b %b E\n", + i = sprintf (sstring, " %#+ -10.10b %015.7b %*.*b %b E\n", arg1, arg1, j, k, arg2, "\pvery short string"); if (i != 77) goto Fail; @@ -75,25 +76,25 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.7\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.7\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.7\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.7\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.7\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.7\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.8.CC b/Tests/Conformance/C17.11.0.8.CC index 850fe2e..d2cab7e 100644 --- a/Tests/Conformance/C17.11.0.8.CC +++ b/Tests/Conformance/C17.11.0.8.CC @@ -2,8 +2,9 @@ /* f format code */ #include +#include -main () +int main (void) { FILE *f1; int i; @@ -31,15 +32,15 @@ main () /* Write formatted output as string to the output files and sstring. */ - i = fprintf (f1, " %# +012.7f %+-8.f %# 011lf T\n", d1, fl1, e1); + i = fprintf (f1, " %# +012.7f %+-8.f %# 011Lf T\n", d1, fl1, e1); if (i != 40) goto Fail; - i = printf (" %# +012.7f %+-8.f %# 011lf T\n", d1, fl1, e1); + i = printf (" %# +012.7f %+-8.f %# 011Lf T\n", d1, fl1, e1); if (i != 40) goto Fail; - i = sprintf (sstring, " %# +012.7f %+-8.f %# 011lf T\n", d1, fl1, e1); + i = sprintf (sstring, " %# +012.7f %+-8.f %# 011Lf T\n", d1, fl1, e1); if (i != 40) goto Fail; @@ -73,25 +74,25 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.8\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.8\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.8\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.8\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.8\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.8\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.11.0.9.CC b/Tests/Conformance/C17.11.0.9.CC index 3873b04..f2d8ebf 100644 --- a/Tests/Conformance/C17.11.0.9.CC +++ b/Tests/Conformance/C17.11.0.9.CC @@ -2,8 +2,9 @@ /* e, E format codes */ #include +#include -main () +int main (void) { FILE *f1; int i; @@ -33,15 +34,15 @@ main () /* Write formatted output as string to the output files and sstring. */ - i = fprintf (f1, " %0+*.*le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1); + i = fprintf (f1, " %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1); if (i != 54) goto Fail; - i = printf (" %0+*.*le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1); + i = printf (" %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1); if (i != 54) goto Fail; - i = sprintf (sstring, " %0+*.*le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1); + i = sprintf (sstring, " %0+*.*Le %- 15E %#0 .e E\n", i1, i2, e1, d1, fl1); if (i != 54) goto Fail; @@ -75,25 +76,25 @@ main () goto Fail2; printf ("Passed Conformance Test 17.11.0.9\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.11.0.9\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open output file for Conformance Test 17.11.0.9\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close output file for Conformance Test 17.11.0.9\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to read output file for Conformance Test 17.11.0.9\n"); - return; + return 0; Fail4: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.11.0.9\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.13.0.1.CC b/Tests/Conformance/C17.13.0.1.CC index 387683a..cf05d1e 100644 --- a/Tests/Conformance/C17.13.0.1.CC +++ b/Tests/Conformance/C17.13.0.1.CC @@ -7,7 +7,7 @@ struct S { int i; float f; char c; }; -main () +int main (void) { struct S s [3] = { 1, 1.0, 'a', 2, 2.0, 'b', 3, 3.0, 'c' }; struct S buff [3]; @@ -61,17 +61,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.13.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.13.0.1\n"); - return; + return 0; Fail1: printf ("Unable to open temp file for Conformance Test 17.13.0.1\n"); - return; + return 0; Fail2: printf ("Unable to close output file for Conformance Test 17.13.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.14.0.1.CC b/Tests/Conformance/C17.14.0.1.CC index 9fb3307..bc29c73 100644 --- a/Tests/Conformance/C17.14.0.1.CC +++ b/Tests/Conformance/C17.14.0.1.CC @@ -6,7 +6,7 @@ struct S { int i; float f; char c; }; -main () +int main (void) { struct S s [3] = { 1, 1.0, 'a', 2, 2.0, 'b', 3, 3.0, 'c' }; struct S buff [3]; @@ -47,17 +47,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.14.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.14.0.1\n"); - return; + return 0; Fail1: printf ("Unable to open temp file for Conformance Test 17.14.0.1\n"); - return; + return 0; Fail2: printf ("Unable to close output file for Conformance Test 17.14.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.15.0.1.CC b/Tests/Conformance/C17.15.0.1.CC index c229a72..4e33560 100644 --- a/Tests/Conformance/C17.15.0.1.CC +++ b/Tests/Conformance/C17.15.0.1.CC @@ -6,7 +6,7 @@ struct S { int i; float f; char c; }; -main () +int main (void) { struct S s [3] = { 1, 1.0, 'a', 2, 2.0, 'b', 3, 3.0, 'c' }; struct S buff [3]; @@ -38,17 +38,17 @@ main () goto Fail; printf ("Passed Conformance Test 17.15.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.15.0.1\n"); - return; + return 0; Fail1: printf ("Unable to open temp file for Conformance Test 17.15.0.1\n"); - return; + return 0; Fail2: printf ("Unable to close output file for Conformance Test 17.15.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.16.0.1.CC b/Tests/Conformance/C17.16.0.1.CC index 57e6aa4..0da9a08 100644 --- a/Tests/Conformance/C17.16.0.1.CC +++ b/Tests/Conformance/C17.16.0.1.CC @@ -6,7 +6,7 @@ struct S { int i; float f; char c; }; -main () +int main (void) { struct S s [3] = { 1, 1.0, 'a', 2, 2.0, 'b', 3, 3.0, 'c' }; struct S buff [3]; @@ -87,17 +87,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.16.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.16.0.1\n"); - return; + return 0; Fail1: printf ("Unable to open temp file for Conformance Test 17.16.0.1\n"); - return; + return 0; Fail2: printf ("Unable to close output file for Conformance Test 17.16.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.5.0.1.CC b/Tests/Conformance/C17.5.0.1.CC index 9a04ef1..1dcabc8 100644 --- a/Tests/Conformance/C17.5.0.1.CC +++ b/Tests/Conformance/C17.5.0.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; /* file pointer */ int i, j, k, m; @@ -88,25 +88,25 @@ main () goto Fail4; printf ("Passed Conformance Test 17.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.5.0.1\n"); - return; + return 0; Fail1: printf ("Could not open tmp file for Conformance Test 17.5.0.1\n"); - return; + return 0; Fail2: printf ("Could not write to file for Conformance Test 17.5.0.1\n"); - return; + return 0; Fail3: printf ("Error while reading file for Conformance Test 17.5.0.1\n"); - return; + return 0; Fail4: printf ("Could not close file for Conformance Test 17.5.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.5.0.2.CC b/Tests/Conformance/C17.5.0.2.CC index a2aa1ed..a224670 100644 --- a/Tests/Conformance/C17.5.0.2.CC +++ b/Tests/Conformance/C17.5.0.2.CC @@ -2,8 +2,9 @@ /* functions for text files */ #include +#include -main () +int main (void) { FILE *f1; /* file pointer */ int i, j, m; @@ -44,7 +45,7 @@ main () j = fseek (f1, 0L, SEEK_END); if (j) goto Fail; - j = fscanf (f1, "%c", &m); + j = fscanf (f1, "%c", (char*)&m); if (j != EOF) goto Fail3; @@ -108,25 +109,25 @@ main () goto Fail4; printf ("Passed Conformance Test 17.5.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.5.0.2\n"); - return; + return 0; Fail1: printf ("Could not open tmp file for Conformance Test 17.5.0.2\n"); - return; + return 0; Fail2: printf ("Could not write to file for Conformance Test 17.5.0.2\n"); - return; + return 0; Fail3: printf ("Error while reading file for Conformance Test 17.5.0.2\n"); - return; + return 0; Fail4: printf ("Could not close file for Conformance Test 17.5.0.2\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.6.0.1.CC b/Tests/Conformance/C17.6.0.1.CC index 3733845..737bcbf 100644 --- a/Tests/Conformance/C17.6.0.1.CC +++ b/Tests/Conformance/C17.6.0.1.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { FILE *f1; int i, j; @@ -84,25 +84,25 @@ main () goto Fail4; printf ("Passed Conformance Test 17.6.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.6.0.1\n"); - return; + return 0; Fail1: printf ("Unable to open temp file for Conformance Test 17.6.0.1\n"); - return; + return 0; Fail2: printf ("Unable to write to temp file for Conformance Test 17.6.0.1\n"); - return; + return 0; Fail3: printf ("Unable to seek to temp file for Conformance Test 17.6.0.1\n"); - return; + return 0; Fail4: printf ("Unable to close temp file for Conformance Test 17.6.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.6.0.2.CC b/Tests/Conformance/C17.6.0.2.CC index e96dac3..4ba3df0 100644 --- a/Tests/Conformance/C17.6.0.2.CC +++ b/Tests/Conformance/C17.6.0.2.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { FILE *f1; int i, j; @@ -53,25 +53,25 @@ main () goto Fail4; printf ("Passed Conformance Test 17.6.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.6.0.2\n"); - return; + return 0; Fail1: printf ("Unable to open temp file for Conformance Test 17.6.0.2\n"); - return; + return 0; Fail2: printf ("Unable to write to temp file for Conformance Test 17.6.0.2\n"); - return; + return 0; Fail3: printf ("Unable to seek to temp file for Conformance Test 17.6.0.2\n"); - return; + return 0; Fail4: printf ("Unable to close temp file for Conformance Test 17.6.0.2\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.7.0.1.CC b/Tests/Conformance/C17.7.0.1.CC index 22040dd..51aff13 100644 --- a/Tests/Conformance/C17.7.0.1.CC +++ b/Tests/Conformance/C17.7.0.1.CC @@ -1,8 +1,9 @@ /* Conformance Test 17.7.0.1: Verification of fgets function, text stream */ #include +#include -main () +int main (void) { FILE *f1; int i; @@ -60,21 +61,21 @@ main () goto Fail3; printf ("Passed Conformance Test 17.7.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.7.0.1\n"); - return; + return 0; Fail1: printf ("Unable to open temp file for Conformance Test 17.7.0.1\n"); - return; + return 0; Fail2: printf ("Unable to write to temp file for Conformance Test 17.7.0.1\n"); - return; + return 0; Fail3: printf ("Unable to close temp file for Conformance Test 17.7.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.7.0.2.CC b/Tests/Conformance/C17.7.0.2.CC index 5045c75..9444868 100644 --- a/Tests/Conformance/C17.7.0.2.CC +++ b/Tests/Conformance/C17.7.0.2.CC @@ -1,8 +1,9 @@ /* Conformance Test 17.7.0.2: Verification of fgets function, binary stream */ #include +#include -main () +int main (void) { FILE *f1; int i; @@ -60,21 +61,21 @@ main () goto Fail3; printf ("Passed Conformance Test 17.7.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.7.0.2\n"); - return; + return 0; Fail1: printf ("Unable to open temp file for Conformance Test 17.7.0.2\n"); - return; + return 0; Fail2: printf ("Unable to write to temp file for Conformance Test 17.7.0.2\n"); - return; + return 0; Fail3: printf ("Unable to close temp file for Conformance Test 17.7.0.2\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.1.CC b/Tests/Conformance/C17.8.0.1.CC index c80061e..add6422 100644 --- a/Tests/Conformance/C17.8.0.1.CC +++ b/Tests/Conformance/C17.8.0.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; short i1, i3; @@ -74,17 +74,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.8.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.1\n"); - return; + return 0; Fail1: printf ("Unable to open input file for Conformance Test 17.8.0.1\n"); - return; + return 0; Fail2: printf ("Unable to close input file for Conformance Test 17.8.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.10.CC b/Tests/Conformance/C17.8.0.10.CC index 76a2d76..3906db5 100644 --- a/Tests/Conformance/C17.8.0.10.CC +++ b/Tests/Conformance/C17.8.0.10.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char string [] = " 327678 D 4294967295m 32767722 "; int i; @@ -37,9 +37,9 @@ main () goto Fail; printf ("Passed Conformance Test 17.8.0.10\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.10\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.11.CC b/Tests/Conformance/C17.8.0.11.CC index f393e3b..e6c40fb 100644 --- a/Tests/Conformance/C17.8.0.11.CC +++ b/Tests/Conformance/C17.8.0.11.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char string [] = " 777778 D 37777777777m 117777526 "; int i; @@ -37,9 +37,9 @@ main () goto Fail; printf ("Passed Conformance Test 17.8.0.11\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.11\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.12.CC b/Tests/Conformance/C17.8.0.12.CC index 8a21299..af4a659 100644 --- a/Tests/Conformance/C17.8.0.12.CC +++ b/Tests/Conformance/C17.8.0.12.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char string [] = " 327678 0x0 D 0xFFFFFFFFm 0x7fEd0X10 "; int i; @@ -39,9 +39,9 @@ main () goto Fail; printf ("Passed Conformance Test 17.8.0.12\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.12\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.13.CC b/Tests/Conformance/C17.8.0.13.CC index ac08d54..0a928c6 100644 --- a/Tests/Conformance/C17.8.0.13.CC +++ b/Tests/Conformance/C17.8.0.13.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { char sstr [] = "bten chars!andMore"; int i; @@ -11,22 +11,22 @@ main () ch = 'a'; /* no assignment should be made */ - i = sscanf (sstr, "%*hc"); /* h ignored */ + i = sscanf (sstr, "%*c"); if (i != 0) goto Fail; if (ch != 'a') goto Fail; - i = sscanf (&sstr [1], "%10lc", string); /* test assignment to string*/ - if (i != 1) /* l ignored */ + i = sscanf (&sstr [1], "%10c", string); /* test assignment to string*/ + if (i != 1) goto Fail; if (strncmp (string, "ten chars!", 10)) goto Fail; printf ("Passed Conformance Test 17.8.0.13\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.13\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.14.CC b/Tests/Conformance/C17.8.0.14.CC index 3b65a8c..b81f9da 100644 --- a/Tests/Conformance/C17.8.0.14.CC +++ b/Tests/Conformance/C17.8.0.14.CC @@ -1,30 +1,31 @@ /* Conformance Test 17.8.0.14: Verification of sscanf, s format code */ #include +#include -main () +int main (void) { char sstr [] = " oneLongWord ten-chars!andMore"; int i, j; char string [50] = "hey, hey!"; - i = sscanf (&sstr[0], "%*hs"); /* no assignment made; h ignored */ + i = sscanf (&sstr[0], "%*s"); /* no assignment made */ if (i != 0) goto Fail; if (strcmp (string, "hey, hey!")) goto Fail; - i = sscanf (&sstr [14], "%10ls", string); /* test assignment to string*/ - if (i != 1) /* l ignored */ + i = sscanf (&sstr [14], "%10s", string); /* test assignment to string*/ + if (i != 1) goto Fail; if (strcmp (string, "ten-chars!")) goto Fail; printf ("Passed Conformance Test 17.8.0.14\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.14\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.15.CC b/Tests/Conformance/C17.8.0.15.CC index ed8abf2..08d577a 100644 --- a/Tests/Conformance/C17.8.0.15.CC +++ b/Tests/Conformance/C17.8.0.15.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { char sstr [] = " 23 -3.8E20 - e- +25e- 00002.00008e000049.9 "; float f1, f2, f3, f4; @@ -27,9 +27,9 @@ main () goto Fail; printf ("Passed Conformance Test 17.8.0.15\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.15\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.16.CC b/Tests/Conformance/C17.8.0.16.CC index 92da4c8..49ed087 100644 --- a/Tests/Conformance/C17.8.0.16.CC +++ b/Tests/Conformance/C17.8.0.16.CC @@ -1,8 +1,9 @@ /* Conformance Test 17.8.0.16: Verification of sscanf, % and [ format codes */ #include +#include -main () +int main (void) { char sstr [] = "% these are the ^only[ characters" "*aaabbb a fine mess, you see! ddddfffffffff"; @@ -10,34 +11,34 @@ main () char string [2] [50] = { {"hey, hey!"}, {"you, you"} }; - i = sscanf (&sstr[0], "%*50h%"); /* no assignment made; * 50 h ignored */ + i = sscanf (&sstr[0], "%%"); /* no assignment made */ if (i != 0) goto Fail; /* Create set of characters which can appear in the output string. */ - i = sscanf (&sstr [1], "%45[thes aronlyc^[] %*[*ab]", &string [0]); + i = sscanf (&sstr [1], "%45[thes aronlyc^[] %*[*ab]", string [0]); if (i != 1) goto Fail; - if (strcmp (&string [0], " these are the ^only[ characters")) + if (strcmp (string [0], " these are the ^only[ characters")) goto Fail; /* Create set of characters which cannot appear in the output string. */ - i = sscanf (&sstr [42], "%[^d] %10[df]", &string [0], &string [1]); + i = sscanf (&sstr [42], "%[^d] %10[df]", string [0], string [1]); if (i != 2) goto Fail; - if (strcmp (&string [0], " a fine mess, you see! ")) + if (strcmp (string [0], " a fine mess, you see! ")) goto Fail; - if (strcmp (&string [1], "ddddffffff")) + if (strcmp (string [1], "ddddffffff")) goto Fail; printf ("Passed Conformance Test 17.8.0.16\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.16\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.17.CC b/Tests/Conformance/C17.8.0.17.CC index 1f1e113..2acb669 100644 --- a/Tests/Conformance/C17.8.0.17.CC +++ b/Tests/Conformance/C17.8.0.17.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { short i1, i3; int i; @@ -79,13 +79,13 @@ main () goto Fail1; printf ("Passed Conformance Test 17.8.0.17\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.17\n"); - return; + return 0; Fail1: printf ("Unable to redirect stdin for Conformance Test 17.8.0.17\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.18.CC b/Tests/Conformance/C17.8.0.18.CC index e70d6e2..3b3cae0 100644 --- a/Tests/Conformance/C17.8.0.18.CC +++ b/Tests/Conformance/C17.8.0.18.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { int i; unsigned short us1; @@ -53,13 +53,13 @@ main () goto Fail1; printf ("Passed Conformance Test 17.8.0.18\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.18\n"); - return; + return 0; Fail1: printf ("Unable to redirect stdin for Conformance Test 17.8.0.18\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.19.CC b/Tests/Conformance/C17.8.0.19.CC index 933fecc..f75fe4b 100644 --- a/Tests/Conformance/C17.8.0.19.CC +++ b/Tests/Conformance/C17.8.0.19.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { int i; unsigned short us1; @@ -53,13 +53,13 @@ main () goto Fail1; printf ("Passed Conformance Test 17.8.0.19\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.19\n"); - return; + return 0; Fail1: printf ("Unable to redirect stdin for Conformance Test 17.8.0.19\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.2.CC b/Tests/Conformance/C17.8.0.2.CC index e2d74d0..4a24962 100644 --- a/Tests/Conformance/C17.8.0.2.CC +++ b/Tests/Conformance/C17.8.0.2.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; int i; @@ -47,17 +47,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.8.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.2\n"); - return; + return 0; Fail1: printf ("Unable to open input file for Conformance Test 17.8.0.2\n"); - return; + return 0; Fail2: printf ("Unable to close input file for Conformance Test 17.8.0.2\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.20.CC b/Tests/Conformance/C17.8.0.20.CC index d43a785..31681de 100644 --- a/Tests/Conformance/C17.8.0.20.CC +++ b/Tests/Conformance/C17.8.0.20.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { int i; unsigned short us1; @@ -55,13 +55,13 @@ main () goto Fail1; printf ("Passed Conformance Test 17.8.0.20\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.20\n"); - return; + return 0; Fail1: printf ("Unable to redirect stdin for Conformance Test 17.8.0.20\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.21.CC b/Tests/Conformance/C17.8.0.21.CC index c00954a..ffe7828 100644 --- a/Tests/Conformance/C17.8.0.21.CC +++ b/Tests/Conformance/C17.8.0.21.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { FILE *f1; int i; @@ -23,14 +23,14 @@ main () goto Fail1; ch = 'a'; /* no assignment should be made */ - i = scanf ("%*hc"); /* h ignored */ + i = scanf ("%*c"); if (i != 0) goto Fail; if (ch != 'a') goto Fail; - i = scanf ("%10lc", string); /* test assignment to string*/ - if (i != 1) /* l ignored */ + i = scanf ("%10c", string); /* test assignment to string*/ + if (i != 1) goto Fail; if (strncmp (string, "ten chars!", 10)) goto Fail; @@ -40,13 +40,13 @@ main () goto Fail1; printf ("Passed Conformance Test 17.8.0.21\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.21\n"); - return; + return 0; Fail1: printf ("Unable to redirect stdin for Conformance Test 17.8.0.21\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.22.CC b/Tests/Conformance/C17.8.0.22.CC index eb4bbd3..ca9dc3b 100644 --- a/Tests/Conformance/C17.8.0.22.CC +++ b/Tests/Conformance/C17.8.0.22.CC @@ -1,8 +1,9 @@ /* Conformance Test 17.8.0.22: Verification of scanf, s format code */ #include +#include -main () +int main (void) { int i, j; char string [50] = "hey, hey!"; @@ -21,14 +22,14 @@ main () if (stdin == NULL) goto Fail1; - i = scanf ("%*hs"); /* no assignment made; h ignored */ + i = scanf ("%*s"); /* no assignment made */ if (i != 0) goto Fail; if (strcmp (string, "hey, hey!")) goto Fail; - i = scanf ("%10ls", string); /* test assignment to string*/ - if (i != 1) /* l ignored */ + i = scanf ("%10s", string); /* test assignment to string */ + if (i != 1) goto Fail; if (strcmp (string, "ten_chars!")) goto Fail; @@ -38,13 +39,13 @@ main () goto Fail1; printf ("Passed Conformance Test 17.8.0.22\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.22\n"); - return; + return 0; Fail1: printf ("Unable to redirect stdin for Conformance Test 17.8.0.22\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.23.CC b/Tests/Conformance/C17.8.0.23.CC index d98ea65..c288ad5 100644 --- a/Tests/Conformance/C17.8.0.23.CC +++ b/Tests/Conformance/C17.8.0.23.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { float f1, f2, f3, f4; double d1, d2, d3; @@ -43,13 +43,13 @@ main () goto Fail1; printf ("Passed Conformance Test 17.8.0.23\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.23\n"); - return; + return 0; Fail1: printf ("Unable to redirect stdin for Conformance Test 17.8.0.23\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.24.CC b/Tests/Conformance/C17.8.0.24.CC index 9f2397b..eb93a5d 100644 --- a/Tests/Conformance/C17.8.0.24.CC +++ b/Tests/Conformance/C17.8.0.24.CC @@ -1,8 +1,9 @@ /* Conformance Test 17.8.0.24: Verification of scanf, % and [ format codes */ #include +#include -main () +int main (void) { int i; char string [2] [50] = { {"hey, hey!"}, {"you, you"} }; @@ -22,26 +23,26 @@ main () if (stdin == NULL) goto Fail1; - i = scanf ("%*50h%"); /* no assignment made; * 50 h ignored */ + i = scanf ("%%"); /* no assignment made */ if (i != 0) goto Fail; /* Create set of characters which can appear in the output string. */ - i = scanf ("%45[thes arohnlyc^[] %*[*ab]", &string [0]); + i = scanf ("%45[thes arohnlyc^[] %*[*ab]", string [0]); if (i != 1) goto Fail; - if (strcmp (&string [0], " these are the ^only[ characters")) + if (strcmp (string [0], " these are the ^only[ characters")) goto Fail; /* Create set of characters which cannot appear in the output string. */ - i = scanf ("%[^d] %10[df]", &string [0], &string [1]); + i = scanf ("%[^d] %10[df]", string [0], string [1]); if (i != 2) goto Fail; - if (strcmp (&string [0], " a fine mess, you see! ")) + if (strcmp (string [0], " a fine mess, you see! ")) goto Fail; - if (strcmp (&string [1], "ddddffffff")) + if (strcmp (string [1], "ddddffffff")) goto Fail; stdin = freopen (".CONSOLE", "r", stdin); /* reset stdin and quit */ @@ -49,13 +50,13 @@ main () goto Fail1; printf ("Passed Conformance Test 17.8.0.24\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.24\n"); - return; + return 0; Fail1: printf ("Unable to open input file for Conformance Test 17.8.0.24\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.3.CC b/Tests/Conformance/C17.8.0.3.CC index 80d31bf..517bbfe 100644 --- a/Tests/Conformance/C17.8.0.3.CC +++ b/Tests/Conformance/C17.8.0.3.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; int i; @@ -47,17 +47,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.8.0.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.3\n"); - return; + return 0; Fail1: printf ("Unable to open input file for Conformance Test 17.8.0.3\n"); - return; + return 0; Fail2: printf ("Unable to close input file for Conformance Test 17.8.0.3\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.4.CC b/Tests/Conformance/C17.8.0.4.CC index 23e7aec..c193916 100644 --- a/Tests/Conformance/C17.8.0.4.CC +++ b/Tests/Conformance/C17.8.0.4.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; int i; @@ -49,17 +49,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.8.0.4\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.4\n"); - return; + return 0; Fail1: printf ("Unable to open input file for Conformance Test 17.8.0.4\n"); - return; + return 0; Fail2: printf ("Unable to close input file for Conformance Test 17.8.0.4\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.5.CC b/Tests/Conformance/C17.8.0.5.CC index f8fee21..8cfd4bd 100644 --- a/Tests/Conformance/C17.8.0.5.CC +++ b/Tests/Conformance/C17.8.0.5.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { FILE *f1; int i; @@ -17,14 +17,14 @@ main () rewind(f1); ch = 'a'; /* no assignment should be made */ - i = fscanf (f1, "%*hc"); /* h ignored */ + i = fscanf (f1, "%*c"); if (i != 0) goto Fail; if (ch != 'a') goto Fail; - i = fscanf (f1, "%10lc", string); /* test assignment to string*/ - if (i != 1) /* l ignored */ + i = fscanf (f1, "%10c", string); /* test assignment to string*/ + if (i != 1) goto Fail; if (strncmp (string, "ten chars!", 10)) goto Fail; @@ -34,17 +34,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.8.0.5\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.5\n"); - return; + return 0; Fail1: printf ("Unable to open input file for Conformance Test 17.8.0.5\n"); - return; + return 0; Fail2: printf ("Unable to close input file for Conformance Test 17.8.0.5\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.6.CC b/Tests/Conformance/C17.8.0.6.CC index 9b3b08c..231e302 100644 --- a/Tests/Conformance/C17.8.0.6.CC +++ b/Tests/Conformance/C17.8.0.6.CC @@ -1,8 +1,9 @@ /* Conformance Test 17.8.0.6: Verification of fscanf, s format code */ #include +#include -main () +int main (void) { FILE *f1; int i, j; @@ -15,14 +16,14 @@ main () fprintf(f1, " oneLongWord ten_chars!andMore"); rewind(f1); - i = fscanf (f1, "%*hs"); /* no assignment made; h ignored */ + i = fscanf (f1, "%*s"); /* no assignment made */ if (i != 0) goto Fail; if (strcmp (string, "hey, hey!")) goto Fail; - i = fscanf (f1, "%10ls", string); /* test assignment to string*/ - if (i != 1) /* l ignored */ + i = fscanf (f1, "%10s", string); /* test assignment to string */ + if (i != 1) goto Fail; if (strcmp (string, "ten_chars!")) goto Fail; @@ -32,17 +33,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.8.0.6\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.6\n"); - return; + return 0; Fail1: printf ("Unable to open input file for Conformance Test 17.8.0.6\n"); - return; + return 0; Fail2: printf ("Unable to close input file for Conformance Test 17.8.0.6\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.7.CC b/Tests/Conformance/C17.8.0.7.CC index 21f9b6a..138669f 100644 --- a/Tests/Conformance/C17.8.0.7.CC +++ b/Tests/Conformance/C17.8.0.7.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { FILE *f; float f1, f2, f3, f4; @@ -37,17 +37,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.8.0.7\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.7\n"); - return; + return 0; Fail1: printf ("Unable to open input file for Conformance Test 17.8.0.7\n"); - return; + return 0; Fail2: printf ("Unable to close input file for Conformance Test 17.8.0.7\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.8.CC b/Tests/Conformance/C17.8.0.8.CC index 7c70a67..9afc96d 100644 --- a/Tests/Conformance/C17.8.0.8.CC +++ b/Tests/Conformance/C17.8.0.8.CC @@ -1,8 +1,9 @@ /* Conformance Test 17.8.0.8: Verification of fscanf, % and [ format codes */ #include +#include -main () +int main (void) { FILE *f1; int i; @@ -16,26 +17,26 @@ main () "you see! ddddfffffffff"); rewind(f1); - i = fscanf (f1, "%*50h%"); /* no assignment made; * 50 h ignored */ + i = fscanf (f1, "%%"); /* no assignment made */ if (i != 0) goto Fail; /* Create set of characters which can appear in the output string. */ - i = fscanf (f1, "%45[thes aronlyc^[h] %*[*ab]", &string [0]); + i = fscanf (f1, "%45[thes aronlyc^[h] %*[*ab]", string [0]); if (i != 1) goto Fail; - if (strcmp (&string [0], " these are the ^only[ characters")) + if (strcmp (string [0], " these are the ^only[ characters")) goto Fail; /* Create set of characters which cannot appear in the output string. */ - i = fscanf (f1, "%[^d] %10[df]", &string [0], &string [1]); + i = fscanf (f1, "%[^d] %10[df]", string [0], string [1]); if (i != 2) goto Fail; - if (strcmp (&string [0], " a fine mess, you see! ")) + if (strcmp (string [0], " a fine mess, you see! ")) goto Fail; - if (strcmp (&string [1], "ddddffffff")) + if (strcmp (string [1], "ddddffffff")) goto Fail; i = fclose (f1); /* close the file and quit */ @@ -43,17 +44,17 @@ main () goto Fail2; printf ("Passed Conformance Test 17.8.0.8\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.8\n"); - return; + return 0; Fail1: printf ("Unable to open input file for Conformance Test 17.8.0.8\n"); - return; + return 0; Fail2: printf ("Unable to close input file for Conformance Test 17.8.0.8\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.8.0.9.CC b/Tests/Conformance/C17.8.0.9.CC index 31fac3e..3bc8f81 100644 --- a/Tests/Conformance/C17.8.0.9.CC +++ b/Tests/Conformance/C17.8.0.9.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char string [] = " +327678 -0 -002147483647A 327677-22 123*"; short i1, i3; @@ -58,9 +58,9 @@ main () goto Fail; printf ("Passed Conformance Test 17.8.0.9\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 17.8.0.9\n"); - return; + return 0; } diff --git a/Tests/Conformance/C17.9.0.1.CC b/Tests/Conformance/C17.9.0.1.CC index 4ef71ab..7d65aa4 100644 --- a/Tests/Conformance/C17.9.0.1.CC +++ b/Tests/Conformance/C17.9.0.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; int i, j; @@ -62,21 +62,21 @@ main () goto Fail2; printf ("Passed Conformance Test 17.9.0.1\n"); - return; + return 0; Fail: fprintf (stderr, "Failed Conformance Test 17.9.0.1\n"); - return; + return 0; Fail1: fprintf (stderr, "Unable to open input file for Conformance Test 17.9.0.1\n"); - return; + return 0; Fail2: fprintf (stderr, "Unable to close input file for Conformance Test 17.9.0.1\n"); - return; + return 0; Fail3: fprintf (stderr, "Unable to redirect stdout for Conformance Test 17.9.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C18.1.0.1.CC b/Tests/Conformance/C18.1.0.1.CC index 14eb804..c38bf94 100644 --- a/Tests/Conformance/C18.1.0.1.CC +++ b/Tests/Conformance/C18.1.0.1.CC @@ -3,16 +3,19 @@ #include #include +int printf(const char *, ...); + struct S { int i; extended e; char ch [40]; }; -main () +int main (void) { - char *rgn; + char *rgn, *ptr1; int i; rgn = (char *) calloc (50, sizeof (struct S)); if (rgn == NULL) goto Fail1; + ptr1 = rgn; for (i = 0; i < 2600; i++) { @@ -21,17 +24,17 @@ main () rgn += 1; } - free (rgn); + free (ptr1); printf ("Passed Conformance Test 18.1.0.1\n"); - return; + return 0; Fail: printf("%u\n", i); printf ("Failed Conformance Test 18.1.0.1\n"); - return; + return 0; Fail1: printf ("Unable to allocate memory for Conformance Test 18.1.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C18.3.0.1.CC b/Tests/Conformance/C18.3.0.1.CC index f6e4e0f..6ac6ea7 100644 --- a/Tests/Conformance/C18.3.0.1.CC +++ b/Tests/Conformance/C18.3.0.1.CC @@ -2,11 +2,14 @@ #include #include +#include #include +int printf(const char *, ...); + struct S { int i; extended e; char ch [40]; }; -main () +int main (void) { struct S *rgn, *ptr1; struct S s [3] = { {1, 1.0, "hey"}, {2, 2.0, "you"}, {3, 3.0, "person!"} }; @@ -57,13 +60,13 @@ main () printf ("Passed Conformance Test 18.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 18.3.0.1\n"); - return; + return 0; Fail1: printf ("Unable to allocate memory for Conformance Test 18.3.0.1\n"); - return; + return 0; } diff --git a/Tests/Conformance/C19.1.0.1.CC b/Tests/Conformance/C19.1.0.1.CC index 9216963..ef8ad4e 100644 --- a/Tests/Conformance/C19.1.0.1.CC +++ b/Tests/Conformance/C19.1.0.1.CC @@ -3,7 +3,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { double d1 = -9.0; int i = -8; @@ -23,7 +25,7 @@ main () goto Fail; printf ("Passed Conformance Test 19.1.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.1.0.1\n"); diff --git a/Tests/Conformance/C19.10.0.1.CC b/Tests/Conformance/C19.10.0.1.CC index b6dadd3..2966bc7 100644 --- a/Tests/Conformance/C19.10.0.1.CC +++ b/Tests/Conformance/C19.10.0.1.CC @@ -3,7 +3,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { double d1; @@ -20,7 +22,7 @@ main () goto Fail; printf ("Passed Conformance Test 19.10.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.10.0.1\n"); diff --git a/Tests/Conformance/C19.2.0.1.CC b/Tests/Conformance/C19.2.0.1.CC index 96e57fd..57e3306 100644 --- a/Tests/Conformance/C19.2.0.1.CC +++ b/Tests/Conformance/C19.2.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { div_t d1; ldiv_t ld1; @@ -17,7 +19,7 @@ main () printf ("Passed Conformance Test 19.2.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.2.0.1\n"); diff --git a/Tests/Conformance/C19.3.0.1.CC b/Tests/Conformance/C19.3.0.1.CC index b83f2bb..68239e4 100644 --- a/Tests/Conformance/C19.3.0.1.CC +++ b/Tests/Conformance/C19.3.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { double d1; @@ -24,7 +26,7 @@ main () printf ("Passed Conformance Test 19.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.3.0.1\n"); diff --git a/Tests/Conformance/C19.4.0.1.CC b/Tests/Conformance/C19.4.0.1.CC index 2cc11b6..6b2440a 100644 --- a/Tests/Conformance/C19.4.0.1.CC +++ b/Tests/Conformance/C19.4.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { double d1; @@ -20,7 +22,7 @@ main () printf ("Passed Conformance Test 19.4.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.4.0.1\n"); diff --git a/Tests/Conformance/C19.5.0.1.CC b/Tests/Conformance/C19.5.0.1.CC index 4f39eb8..3db7ad9 100644 --- a/Tests/Conformance/C19.5.0.1.CC +++ b/Tests/Conformance/C19.5.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { double d1, d2; int i; @@ -26,7 +28,7 @@ main () printf ("Passed Conformance Test 19.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.5.0.1\n"); diff --git a/Tests/Conformance/C19.6.0.1.CC b/Tests/Conformance/C19.6.0.1.CC index bca508d..91a574a 100644 --- a/Tests/Conformance/C19.6.0.1.CC +++ b/Tests/Conformance/C19.6.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { double d1; @@ -24,7 +26,7 @@ main () printf ("Passed Conformance Test 19.6.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.6.0.1\n"); diff --git a/Tests/Conformance/C19.7.0.1.CC b/Tests/Conformance/C19.7.0.1.CC index bdcf4e9..d3bf2d2 100644 --- a/Tests/Conformance/C19.7.0.1.CC +++ b/Tests/Conformance/C19.7.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j, array1 [20], array30 [20]; @@ -41,7 +43,7 @@ main () printf ("Passed Conformance Test 19.7.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.7.0.1\n"); diff --git a/Tests/Conformance/C19.8.0.1.CC b/Tests/Conformance/C19.8.0.1.CC index f8e3260..26e82c1 100644 --- a/Tests/Conformance/C19.8.0.1.CC +++ b/Tests/Conformance/C19.8.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { double d1; @@ -20,7 +22,7 @@ main () printf ("Passed Conformance Test 19.8.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.8.0.1\n"); diff --git a/Tests/Conformance/C19.9.0.1.CC b/Tests/Conformance/C19.9.0.1.CC index 9ed0bb6..1caa1ce 100644 --- a/Tests/Conformance/C19.9.0.1.CC +++ b/Tests/Conformance/C19.9.0.1.CC @@ -3,7 +3,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { double d1; @@ -25,7 +27,7 @@ main () printf ("Passed Conformance Test 19.9.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 19.9.0.1\n"); diff --git a/Tests/Conformance/C2.1.0.1.CC b/Tests/Conformance/C2.1.0.1.CC index 6ed33c6..791b1b9 100644 --- a/Tests/Conformance/C2.1.0.1.CC +++ b/Tests/Conformance/C2.1.0.1.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.1.0.1: Verification of character set */ -main () + +int printf(const char *, ...); + +int main (void) { char string1 [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char string2 [] = "abcdefghijklmnopqrstuvwxyz"; @@ -57,7 +60,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.1.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.1.0.1\n"); diff --git a/Tests/Conformance/C2.1.0.2.CC b/Tests/Conformance/C2.1.0.2.CC index c292be3..6e7b112 100644 --- a/Tests/Conformance/C2.1.0.2.CC +++ b/Tests/Conformance/C2.1.0.2.CC @@ -1,8 +1,12 @@ /* Conformance Test 2.1.0.2: Verification of ANSI C trigraphs */ +#include + +int printf(const char *, ...); + ??=define ten 10 /* ??= is '#' */ -main () +int main (void) ??< /* ??< is '{' */ int i; char a, b??(10??) = "abc"; /* ??( is '[' */ @@ -34,7 +38,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.1.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.1.0.2\n"); diff --git a/Tests/Conformance/C2.1.0.3.CC b/Tests/Conformance/C2.1.0.3.CC index 466d81c..d70b6a9 100644 --- a/Tests/Conformance/C2.1.0.3.CC +++ b/Tests/Conformance/C2.1.0.3.CC @@ -1,7 +1,9 @@ /* Conformance Test 2.1.0.3: Verification of ANSI C trigraphs in */ /* character constants */ -main () +int printf(const char *, ...); + +int main (void) { char a; @@ -42,7 +44,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.1.0.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.1.0.3\n"); diff --git a/Tests/Conformance/C2.1.0.4.CC b/Tests/Conformance/C2.1.0.4.CC index afea8bc..86abe7a 100644 --- a/Tests/Conformance/C2.1.0.4.CC +++ b/Tests/Conformance/C2.1.0.4.CC @@ -1,7 +1,11 @@ /* Conformance Test 2.1.0.4: Verification of ANSI C trigraphs in */ /* character string constants */ -main () +#include + +int printf(const char *, ...); + +int main (void) { char a [] = "??=??/boh??'??!??-??(??boy"; @@ -9,7 +13,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.1.0.4\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.1.0.4\n"); diff --git a/Tests/Conformance/C2.1.1.1.CC b/Tests/Conformance/C2.1.1.1.CC index 6a5bb3b..27c534e 100644 --- a/Tests/Conformance/C2.1.1.1.CC +++ b/Tests/Conformance/C2.1.1.1.CC @@ -1,7 +1,9 @@ /* Conformance Test 2.1.1.1: Verification of encoding for null */ #include -main () +int printf(const char *, ...); + +int main (void) { char string [4]; @@ -14,7 +16,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.1.1.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.1.1.1\n"); diff --git a/Tests/Conformance/C2.1.1.2.CC b/Tests/Conformance/C2.1.1.2.CC index 7194f32..66efdc3 100644 --- a/Tests/Conformance/C2.1.1.2.CC +++ b/Tests/Conformance/C2.1.1.2.CC @@ -1,5 +1,10 @@ /* Conformance Test 2.1.1.2: Verification of newline character */ -main () + +#include + +int printf(const char *, ...); + +int main (void) { char string [10]; @@ -16,7 +21,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.1.1.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.1.1.2\n"); diff --git a/Tests/Conformance/C2.1.2.1.CC b/Tests/Conformance/C2.1.2.1.CC index 97634cb..c8cd5e1 100755 --- a/Tests/Conformance/C2.1.2.1.CC +++ b/Tests/Conformance/C2.1.2.1.CC @@ -1,2 +1,4 @@ -main ( ) +int printf(const char *, ...); + +int main (void) { printf ("Passed Conformance Test 2.1.2.1\n"); } \ No newline at end of file diff --git a/Tests/Conformance/C2.1.2.2.CC b/Tests/Conformance/C2.1.2.2.CC index 45eff4c..60a37af 100644 --- a/Tests/Conformance/C2.1.2.2.CC +++ b/Tests/Conformance/C2.1.2.2.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.1.2.2: Ensure '\' can be used to continue source lines */ -main () + +int printf(const char *, ...); + +int main (void) { int i; @@ -28,7 +31,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.1.2.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.1.2.2\n"); diff --git a/Tests/Conformance/C2.1.2.3.CC b/Tests/Conformance/C2.1.2.3.CC index 0558edd..fb9c6df 100644 --- a/Tests/Conformance/C2.1.2.3.CC +++ b/Tests/Conformance/C2.1.2.3.CC @@ -4,7 +4,7 @@ #define CONSTANT \ 5 -main () +int main (void) { if (CONSTANT != 5) printf ("Failed Conformance Test 2.1.2.3\n"); diff --git a/Tests/Conformance/C2.2.0.1.CC b/Tests/Conformance/C2.2.0.1.CC index 0d878f6..8e1753a 100644 --- a/Tests/Conformance/C2.2.0.1.CC +++ b/Tests/Conformance/C2.2.0.1.CC @@ -1,5 +1,8 @@ /* Test 2.2.0.1: in-line comments */ -main (/* This should be ignored */) + +int printf(const char *, ...); + +int main (/* This should be ignored */ void) /*{ brackets should not be seen }*/ { printf ("Passed Conformance Test 2.2.0.1\n"); diff --git a/Tests/Conformance/C2.2.0.2.CC b/Tests/Conformance/C2.2.0.2.CC index 9ca1347..010fc3e 100644 --- a/Tests/Conformance/C2.2.0.2.CC +++ b/Tests/Conformance/C2.2.0.2.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.2.0.2: Comments crossing multiple lines */ -main () + +int printf(const char *, ...); + +int main (void) { /* Should ignore this comment line diff --git a/Tests/Conformance/C2.2.0.3.CC b/Tests/Conformance/C2.2.0.3.CC index 27d5ee1..85e3d5d 100644 --- a/Tests/Conformance/C2.2.0.3.CC +++ b/Tests/Conformance/C2.2.0.3.CC @@ -1,9 +1,12 @@ /* Conformance test 2.2.0.3: Comments in preprocessor lines */ + +int printf(const char *, ...); + #define ten /* ten: one greater than nine */ (2 * 5) -main () +int main (void) { if (ten == 10) { diff --git a/Tests/Conformance/C2.2.0.4.CC b/Tests/Conformance/C2.2.0.4.CC index 84c5e40..0080564 100644 --- a/Tests/Conformance/C2.2.0.4.CC +++ b/Tests/Conformance/C2.2.0.4.CC @@ -1,6 +1,10 @@ /* Conformance test 2.2.0.4: Comment characters in strings */ -main () +#include + +int printf(const char *, ...); + +int main (void) { if (strlen("/*") == 2) printf ("Passed Conformance Test 2.2.0.4\n"); diff --git a/Tests/Conformance/C2.4.0.1.CC b/Tests/Conformance/C2.4.0.1.CC index 18f9aa9..f802c1c 100644 --- a/Tests/Conformance/C2.4.0.1.CC +++ b/Tests/Conformance/C2.4.0.1.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.4.0.1: Ensure =+ is assigment followed by unary plus */ -main () + +int printf(const char *, ...); + +int main (void) { int a; diff --git a/Tests/Conformance/C2.4.0.2.CC b/Tests/Conformance/C2.4.0.2.CC index e8789e8..081aa8a 100644 --- a/Tests/Conformance/C2.4.0.2.CC +++ b/Tests/Conformance/C2.4.0.2.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.4.0.2: Ensure =- is assigment followed by unary minus */ -main () + +int printf(const char *, ...); + +int main (void) { int a; diff --git a/Tests/Conformance/C2.5.0.1.CC b/Tests/Conformance/C2.5.0.1.CC index 908fed1..ba30dca 100644 --- a/Tests/Conformance/C2.5.0.1.CC +++ b/Tests/Conformance/C2.5.0.1.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.5.0.1: Test characters comprising identifiers for */ /* variables */ -main () + +int printf(const char *, ...); + +int main (void) { int a_______________000000000000000000000000000000; short _____________________________________________9; @@ -58,7 +61,7 @@ Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321 != 3) goto Fail; printf ("Passed Conformance Test 2.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.5.0.1\n"); diff --git a/Tests/Conformance/C2.5.0.2.CC b/Tests/Conformance/C2.5.0.2.CC index c209efe..5e52733 100644 --- a/Tests/Conformance/C2.5.0.2.CC +++ b/Tests/Conformance/C2.5.0.2.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.5.0.2: Test characters comprising function identifiers */ -main () + +int printf(const char *, ...); + +int main (void) { extern double i_______________000000000000000000000000000000__________ (); @@ -33,7 +36,7 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\ goto Fail; printf ("Passed Conformance Test 2.5.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.5.0.2\n"); diff --git a/Tests/Conformance/C2.5.0.3.CC b/Tests/Conformance/C2.5.0.3.CC index 4a401f9..84cdbeb 100644 --- a/Tests/Conformance/C2.5.0.3.CC +++ b/Tests/Conformance/C2.5.0.3.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.5.0.3: Test characters comprising identifiers for */ /* user-defined types */ -main () + +int printf(const char *, ...); + +int main (void) { typedef short _____________________________________________9; @@ -41,7 +44,7 @@ Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321 y; goto Fail; printf ("Passed Conformance Test 2.5.0.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.5.0.3\n"); diff --git a/Tests/Conformance/C2.5.0.4.CC b/Tests/Conformance/C2.5.0.4.CC index dde587f..8f962b0 100644 --- a/Tests/Conformance/C2.5.0.4.CC +++ b/Tests/Conformance/C2.5.0.4.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.5.0.4: Test characters comprising identifiers for */ /* structures */ -main () + +int printf(const char *, ...); + +int main (void) { struct _____________________________________________9 { @@ -104,7 +107,7 @@ Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321) printf ("Passed Conformance Test 2.5.0.4\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.5.0.4\n"); diff --git a/Tests/Conformance/C2.5.0.5.CC b/Tests/Conformance/C2.5.0.5.CC index 9dd6988..0268316 100644 --- a/Tests/Conformance/C2.5.0.5.CC +++ b/Tests/Conformance/C2.5.0.5.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.5.0.5: Test characters comprising identifiers for */ /* unions */ -main () + +int printf(const char *, ...); + +int main (void) { union _____________________________________________9 { @@ -105,7 +108,7 @@ Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321) goto Fail; printf ("Passed Conformance Test 2.5.0.5\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.5.0.5\n"); diff --git a/Tests/Conformance/C2.5.0.6.CC b/Tests/Conformance/C2.5.0.6.CC index bbcf9c6..48c0225 100644 --- a/Tests/Conformance/C2.5.0.6.CC +++ b/Tests/Conformance/C2.5.0.6.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.5.0.6: Test characters comprising identifiers for */ /* enumerations */ -main () + +int printf(const char *, ...); + +int main (void) { enum _____________________________________________9 { @@ -63,7 +66,7 @@ Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321; goto Fail; printf ("Passed Conformance Test 2.5.0.6\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.5.0.6\n"); diff --git a/Tests/Conformance/C2.5.0.7.CC b/Tests/Conformance/C2.5.0.7.CC index 28d56bc..971fb29 100644 --- a/Tests/Conformance/C2.5.0.7.CC +++ b/Tests/Conformance/C2.5.0.7.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.5.0.7: Test characters comprising identifiers for */ /* preprocessor macros */ + +int printf(const char *, ...); + #define _____________________________________________9 10 #define ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ @@ -14,7 +17,7 @@ abcdefghijklmnopqrstuvwxyz_____________01234567899876543210\ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_____________\ 0123456789987654321 30 -main () +int main (void) { if (_____________________________________________9 != 10) goto Fail; @@ -32,7 +35,7 @@ Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321 != 30) goto Fail; printf ("Passed Conformance Test 2.5.0.7\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.5.0.7\n"); diff --git a/Tests/Conformance/C2.5.0.8.CC b/Tests/Conformance/C2.5.0.8.CC index 439909c..3f0e3f0 100644 --- a/Tests/Conformance/C2.5.0.8.CC +++ b/Tests/Conformance/C2.5.0.8.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.5.0.8: Test characters comprising identifiers for */ /* labels */ -main () + +int printf(const char *, ...); + +int main (void) { goto _____________________________________________9; @@ -30,5 +33,4 @@ tuvwxyz_____________01234567899876543210ABCDEFGHIJKLMNOPQRSTUVWXY\ Zabcdefghijklmnopqrstuvwxyz_____________0123456789987654321: printf ("Passed Conformance Test 2.5.0.8\n"); - return; } diff --git a/Tests/Conformance/C2.6.0.1.CC b/Tests/Conformance/C2.6.0.1.CC index 6bc7b71..2b25d87 100644 --- a/Tests/Conformance/C2.6.0.1.CC +++ b/Tests/Conformance/C2.6.0.1.CC @@ -3,6 +3,10 @@ /* words except GOTO, IF, and RETURN are */ /* checked. (They're used in the program) */ +int printf(const char *, ...); + +typedef int T; + #define asm 1 #define auto 2 #define break 3 @@ -39,7 +43,7 @@ #define volatile 34 #define while 35 -main () +T main () { if (asm != 1) goto Fail; @@ -113,7 +117,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.6.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.6.0.1\n"); diff --git a/Tests/Conformance/C2.6.0.2.CC b/Tests/Conformance/C2.6.0.2.CC index 82f17fb..66c90f8 100644 --- a/Tests/Conformance/C2.6.0.2.CC +++ b/Tests/Conformance/C2.6.0.2.CC @@ -1,11 +1,15 @@ /* Conformance Test 2.6.0.2: Check if reserved words can be used as */ /* preprocessor macro names */ +#include + +int printf(const char *, ...); + #define goto 1 #define if 2 #define return 3 -main () +int main (void) { while (goto != 1) diff --git a/Tests/Conformance/C2.6.0.3.CC b/Tests/Conformance/C2.6.0.3.CC index 28e5a1a..feba796 100644 --- a/Tests/Conformance/C2.6.0.3.CC +++ b/Tests/Conformance/C2.6.0.3.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.6.0.3: Ensure reserved words within identifiers are */ /* ignored */ -main () + +int printf(const char *, ...); + +int main (void) { int asmm, auto_1, tbreak, casechar, continue_default, dodoubleelse; short _comp, extended_, inlinee, pascal0, segment_; diff --git a/Tests/Conformance/C2.6.0.4.CC b/Tests/Conformance/C2.6.0.4.CC index 41e8ab0..26b411f 100644 --- a/Tests/Conformance/C2.6.0.4.CC +++ b/Tests/Conformance/C2.6.0.4.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.6.0.4: Ensure reserved words within strings are ignored */ -main () + +int printf(const char *, ...); + +int main (void) { char s0 [] = "asm"; char s1 [] = "auto"; diff --git a/Tests/Conformance/C2.6.0.5.CC b/Tests/Conformance/C2.6.0.5.CC index 87eb8db..0d37137 100644 --- a/Tests/Conformance/C2.6.0.5.CC +++ b/Tests/Conformance/C2.6.0.5.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.6.0.5: Ensure reserved words within comments are */ /* ignored */ -main () + +int printf(const char *, ...); + +int main (void) { /* int auto, break, case, char, continue, default, do, double; */ /* long else, enum, extern, float, for, goto, if, int, long; */ diff --git a/Tests/Conformance/C2.7.1.1.CC b/Tests/Conformance/C2.7.1.1.CC index ee1b3a9..325a1e7 100644 --- a/Tests/Conformance/C2.7.1.1.CC +++ b/Tests/Conformance/C2.7.1.1.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.7.1.1: Test decimal integer constants */ -main () + +int printf(const char *, ...); + +int main (void) { int a; short b; @@ -35,7 +38,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.1.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.1.1\n"); diff --git a/Tests/Conformance/C2.7.1.2.CC b/Tests/Conformance/C2.7.1.2.CC index 446a7dc..dc0577e 100644 --- a/Tests/Conformance/C2.7.1.2.CC +++ b/Tests/Conformance/C2.7.1.2.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.7.1.2: Test octal integer constants */ -main () + +int printf(const char *, ...); + +int main (void) { int a; short b; @@ -42,7 +45,7 @@ main () 000000000000000000000000000007; printf ("Passed Conformance Test 2.7.1.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.1.2\n"); diff --git a/Tests/Conformance/C2.7.1.3.CC b/Tests/Conformance/C2.7.1.3.CC index 2c1a10f..220f154 100644 --- a/Tests/Conformance/C2.7.1.3.CC +++ b/Tests/Conformance/C2.7.1.3.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.7.1.3: Test hexadecimal integer constants */ -main () + +int printf(const char *, ...); + +int main (void) { int a; short b; @@ -44,7 +47,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.1.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.1.3\n"); diff --git a/Tests/Conformance/C2.7.1.4.CC b/Tests/Conformance/C2.7.1.4.CC index 0801b5c..b4c036d 100644 --- a/Tests/Conformance/C2.7.1.4.CC +++ b/Tests/Conformance/C2.7.1.4.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.7.1.4: Test decimal long integer constants */ -main () + +int printf(const char *, ...); + +int main (void) { long a; long int b; @@ -28,7 +31,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.1.4\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.1.4\n"); diff --git a/Tests/Conformance/C2.7.1.5.CC b/Tests/Conformance/C2.7.1.5.CC index 8583753..8f520ba 100644 --- a/Tests/Conformance/C2.7.1.5.CC +++ b/Tests/Conformance/C2.7.1.5.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.7.1.5: Test octal long integer constants */ -main () + +int printf(const char *, ...); + +int main (void) { long a; long int b; @@ -41,7 +44,7 @@ main () 000000000000000000000000000007; printf ("Passed Conformance Test 2.7.1.5\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.1.5\n"); diff --git a/Tests/Conformance/C2.7.1.6.CC b/Tests/Conformance/C2.7.1.6.CC index 1e519c8..5e2f463 100644 --- a/Tests/Conformance/C2.7.1.6.CC +++ b/Tests/Conformance/C2.7.1.6.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.7.1.6: Test hexadecimal long integer constants */ -main () + +int printf(const char *, ...); + +int main (void) { long a; long int b; @@ -43,7 +46,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.1.6\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.1.6\n"); diff --git a/Tests/Conformance/C2.7.1.7.CC b/Tests/Conformance/C2.7.1.7.CC index e2e2c31..3430f63 100644 --- a/Tests/Conformance/C2.7.1.7.CC +++ b/Tests/Conformance/C2.7.1.7.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.7.1.7: Test unsigned integer constants */ -main () + +int printf(const char *, ...); + +int main (void) { unsigned a; unsigned int b; @@ -51,7 +54,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.1.7\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.1.7\n"); diff --git a/Tests/Conformance/C2.7.1.8.CC b/Tests/Conformance/C2.7.1.8.CC index 10a1705..0fd5498 100644 --- a/Tests/Conformance/C2.7.1.8.CC +++ b/Tests/Conformance/C2.7.1.8.CC @@ -1,5 +1,8 @@ /* Conformance Test 2.7.1.8: Test unsigned long integer constants */ -main () + +int printf(const char *, ...); + +int main (void) { unsigned long a; unsigned long int b; @@ -46,7 +49,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.1.8\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.1.8\n"); diff --git a/Tests/Conformance/C2.7.2.1.CC b/Tests/Conformance/C2.7.2.1.CC index d31a1d6..651cbb9 100644 --- a/Tests/Conformance/C2.7.2.1.CC +++ b/Tests/Conformance/C2.7.2.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { float a; @@ -64,7 +66,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.2.1\n"); - return; + return 0; Fail: printf("Failed Conformance Test 2.7.2.1\n"); diff --git a/Tests/Conformance/C2.7.2.2.CC b/Tests/Conformance/C2.7.2.2.CC index 7f815d6..4b57987 100644 --- a/Tests/Conformance/C2.7.2.2.CC +++ b/Tests/Conformance/C2.7.2.2.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { double a; @@ -56,7 +58,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.2.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.2.2\n"); diff --git a/Tests/Conformance/C2.7.2.3.CC b/Tests/Conformance/C2.7.2.3.CC index 54dddcc..2b3cca0 100644 --- a/Tests/Conformance/C2.7.2.3.CC +++ b/Tests/Conformance/C2.7.2.3.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { long double a; @@ -56,7 +58,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.2.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.2.3\n"); diff --git a/Tests/Conformance/C2.7.3.1.CC b/Tests/Conformance/C2.7.3.1.CC index 268f6a5..0d21ea4 100644 --- a/Tests/Conformance/C2.7.3.1.CC +++ b/Tests/Conformance/C2.7.3.1.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.7.3.1: Check ASCII encodings for all character */ /* constants */ -main () + +int printf(const char *, ...); + +int main (void) { char a; @@ -419,7 +422,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.3.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.3.1\n"); diff --git a/Tests/Conformance/C2.7.3.2.CC b/Tests/Conformance/C2.7.3.2.CC index aa2bf66..0f066e8 100644 --- a/Tests/Conformance/C2.7.3.2.CC +++ b/Tests/Conformance/C2.7.3.2.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.7.3.2: Ensure char variables are implemented as */ /* unsigned 8-bit integers */ -main () + +int printf(const char *, ...); + +int main (void) { char a; int i; @@ -13,7 +16,7 @@ main () } printf ("Passed Conformance Test 2.7.3.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.3.2\n"); diff --git a/Tests/Conformance/C2.7.4.1.CC b/Tests/Conformance/C2.7.4.1.CC index b9448ef..c0f497b 100644 --- a/Tests/Conformance/C2.7.4.1.CC +++ b/Tests/Conformance/C2.7.4.1.CC @@ -1,5 +1,10 @@ /* Conformance Test 2.7.4.1: Test implementation of ORCA/C p-strings */ -main () + +#include + +int printf(const char *, ...); + +int main (void) { char a [300]; @@ -16,7 +21,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.4.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.4.1\n"); diff --git a/Tests/Conformance/C2.7.4.2.CC b/Tests/Conformance/C2.7.4.2.CC index a89f3da..663bf2c 100644 --- a/Tests/Conformance/C2.7.4.2.CC +++ b/Tests/Conformance/C2.7.4.2.CC @@ -1,6 +1,11 @@ /* Conformance Test 2.7.4.2: Ensure ability to define string constants */ /* across source lines */ -main () + +#include + +int printf(const char *, ...); + +int main (void) { char s[300] = "The string begins here...\ and ends here!"; @@ -14,7 +19,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.4.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.4.2\n"); diff --git a/Tests/Conformance/C2.7.4.3.CC b/Tests/Conformance/C2.7.4.3.CC index 48ee4a5..4131f51 100644 --- a/Tests/Conformance/C2.7.4.3.CC +++ b/Tests/Conformance/C2.7.4.3.CC @@ -1,9 +1,13 @@ /* Conformance Test 2.7.4.3: Test strings of critical length in scanner */ +#pragma stacksize 8192 + +int printf(const char *, ...); + #include #include -main () +int main (void) { int i; char *strPtr; @@ -210,7 +214,7 @@ abcdefghijklmnopqrstuvwxyz01234567890123456789AB", 100)) goto Fail; printf ("Passed Conformance Test 2.7.4.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.4.3\n"); diff --git a/Tests/Conformance/C2.7.4.4.CC b/Tests/Conformance/C2.7.4.4.CC index 204df00..5775402 100644 --- a/Tests/Conformance/C2.7.4.4.CC +++ b/Tests/Conformance/C2.7.4.4.CC @@ -1,4 +1,6 @@ -main ( ) +int printf(const char *, ...); + +int main (void) { char a [300] = \ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; diff --git a/Tests/Conformance/C2.7.7.1.CC b/Tests/Conformance/C2.7.7.1.CC index 6c71450..9356eb7 100644 --- a/Tests/Conformance/C2.7.7.1.CC +++ b/Tests/Conformance/C2.7.7.1.CC @@ -1,6 +1,9 @@ /* Conformance Test 2.7.7.1: Verification of numeric escape codes in */ /* character constants */ -main () + +int printf(const char *, ...); + +int main (void) { char a; @@ -241,7 +244,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.7.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.7.1\n"); diff --git a/Tests/Conformance/C2.7.7.2.CC b/Tests/Conformance/C2.7.7.2.CC index 62c74b1..f472fa5 100644 --- a/Tests/Conformance/C2.7.7.2.CC +++ b/Tests/Conformance/C2.7.7.2.CC @@ -1,6 +1,11 @@ /* Conformance Test 2.7.7.2: Verification of numeric escape codes */ /* within character strings */ -main () + +#include + +int printf(const char *, ...); + +int main (void) { char a [300]; @@ -57,7 +62,7 @@ main () goto Fail; printf ("Passed Conformance Test 2.7.7.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 2.7.7.2\n"); diff --git a/Tests/Conformance/C20.1.0.1.CC b/Tests/Conformance/C20.1.0.1.CC index 5661045..8b65473 100644 --- a/Tests/Conformance/C20.1.0.1.CC +++ b/Tests/Conformance/C20.1.0.1.CC @@ -10,7 +10,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { clock_t clicks; char **dpHandle, *dPageAddr; @@ -82,7 +84,7 @@ main () MTShutDown (); printf ("Passed Conformance Test 20.1.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 20.1.0.1\n"); diff --git a/Tests/Conformance/C20.5.0.1.CC b/Tests/Conformance/C20.5.0.1.CC index 3c26374..1a7d55f 100644 --- a/Tests/Conformance/C20.5.0.1.CC +++ b/Tests/Conformance/C20.5.0.1.CC @@ -3,7 +3,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { double d1; time_t t1, t0; @@ -19,7 +21,7 @@ main () goto Fail; printf ("Passed Conformance Test 20.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 20.5.0.1\n"); diff --git a/Tests/Conformance/C21.1.0.2.CC b/Tests/Conformance/C21.1.0.2.CC index 4fa5ce3..9d2d3a8 100644 --- a/Tests/Conformance/C21.1.0.2.CC +++ b/Tests/Conformance/C21.1.0.2.CC @@ -3,7 +3,9 @@ #include #define NDEBUG 1 -main () +int printf(const char *, ...); + +int main (void) { int i = 7; assert (i == 7); diff --git a/Tests/Conformance/C21.4.0.1.CC b/Tests/Conformance/C21.4.0.1.CC index a304ab3..07ff15b 100644 --- a/Tests/Conformance/C21.4.0.1.CC +++ b/Tests/Conformance/C21.4.0.1.CC @@ -2,6 +2,8 @@ #include +int printf(const char *, ...); + jmp_buf env; /* setjmp, longjmp environment array */ @@ -17,7 +19,7 @@ void F1 (char ch) /*****************************************************************************/ -main () +int main (void) { int i; @@ -29,7 +31,7 @@ main () else if (i == 1) /* check second return from setjmp */ { printf ("Passed Conformance Test 21.4.0.1\n"); - return; + return 0; } else diff --git a/Tests/Conformance/C22.5.0.1.CC b/Tests/Conformance/C22.5.0.1.CC index 48eb4de..43ff559 100644 --- a/Tests/Conformance/C22.5.0.1.CC +++ b/Tests/Conformance/C22.5.0.1.CC @@ -3,11 +3,16 @@ #include #include +int printf(const char *, ...); + /******************************************************************************/ -int Compare (int *i1, int *i2) +int Compare (const void *p1, const void *p2) { + int const *i1 = p1; + int const *i2 = p2; + if (*i1 < *i2) return (-1); @@ -21,7 +26,7 @@ int Compare (int *i1, int *i2) /******************************************************************************/ -main () +int main (void) { int i [10] = { 3, 4, 6, 8, 0, 2, 1, 5, 3, 7 }; int j, *iptr; @@ -58,7 +63,7 @@ main () goto Fail; printf ("Passed Conformance Test 22.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 22.5.0.1\n"); diff --git a/Tests/Conformance/C23.1.0.1.CC b/Tests/Conformance/C23.1.0.1.CC index c23839e..f0ef25d 100644 --- a/Tests/Conformance/C23.1.0.1.CC +++ b/Tests/Conformance/C23.1.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { char *ptr; char pstring [] = "\pThis is a so-called Pascal string"; @@ -27,7 +29,7 @@ M a b c d e f g h i j k l m n o p q r s t u v")) ) goto Fail; printf ("Passed Conformance Test 23.1.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 23.1.0.1\n"); diff --git a/Tests/Conformance/C23.2.0.1.CC b/Tests/Conformance/C23.2.0.1.CC index bef8119..c0dd510 100644 --- a/Tests/Conformance/C23.2.0.1.CC +++ b/Tests/Conformance/C23.2.0.1.CC @@ -4,10 +4,13 @@ #include +extern pascal void SysIOStartup (void); +extern pascal void SysIOShutDown (void); + int main (void) { - SYSIOSTARTUP(); + SysIOStartup(); printf ("Passed Conformance Test 23.2.0.1\n"); - SYSIOSHUTDOWN(); - return; + SysIOShutDown(); + return 0; } diff --git a/Tests/Conformance/C23.3.0.1.CC b/Tests/Conformance/C23.3.0.1.CC index 5c91a03..dbbac6d 100644 --- a/Tests/Conformance/C23.3.0.1.CC +++ b/Tests/Conformance/C23.3.0.1.CC @@ -1,8 +1,11 @@ /* Conformance Test 23.3.0.1: Verification of shellid function */ #include +#include -main () +int printf(const char *, ...); + +int main (void) { char *id; @@ -11,7 +14,7 @@ main () goto Fail; printf ("Passed Conformance Test 23.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 23.3.0.1\n"); diff --git a/Tests/Conformance/C23.4.0.1.CC b/Tests/Conformance/C23.4.0.1.CC index 0840890..3ae868e 100644 --- a/Tests/Conformance/C23.4.0.1.CC +++ b/Tests/Conformance/C23.4.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { startdesk (640); if ( toolerror () ) @@ -12,7 +14,7 @@ main () goto Fail; printf ("Passed Conformance Test 23.4.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 23.4.0.1\n"); diff --git a/Tests/Conformance/C23.5.0.1.CC b/Tests/Conformance/C23.5.0.1.CC index 1d82e8c..bca8761 100644 --- a/Tests/Conformance/C23.5.0.1.CC +++ b/Tests/Conformance/C23.5.0.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { startgraph (640); if ( toolerror () ) @@ -12,7 +14,7 @@ main () goto Fail; printf ("Passed Conformance Test 23.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 23.5.0.1\n"); diff --git a/Tests/Conformance/C24.0.1.CC b/Tests/Conformance/C24.0.1.CC index ffabf7e..8354900 100644 --- a/Tests/Conformance/C24.0.1.CC +++ b/Tests/Conformance/C24.0.1.CC @@ -92,14 +92,14 @@ Fail: return 1; } -main () +int main (void) { if (sub1()) goto Fail; if (sub2()) goto Fail; if (sub3()) goto Fail; printf ("Passed Conformance Test 24.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 24.0.1\n"); diff --git a/Tests/Conformance/C24.0.3.CC b/Tests/Conformance/C24.0.3.CC index bd4e357..0bcd0ea 100644 --- a/Tests/Conformance/C24.0.3.CC +++ b/Tests/Conformance/C24.0.3.CC @@ -7,7 +7,7 @@ typedef enum {false, true} boolean; -void main (void) +int main (void) { boolean fail; diff --git a/Tests/Conformance/C25.0.1.CC b/Tests/Conformance/C25.0.1.CC index bb7a28d..7045351 100644 --- a/Tests/Conformance/C25.0.1.CC +++ b/Tests/Conformance/C25.0.1.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i; int count = 0; @@ -88,7 +88,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.1\n"); diff --git a/Tests/Conformance/C25.0.10.CC b/Tests/Conformance/C25.0.10.CC index ee1543c..379bc3a 100644 --- a/Tests/Conformance/C25.0.10.CC +++ b/Tests/Conformance/C25.0.10.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -50,7 +50,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.10\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.10\n"); diff --git a/Tests/Conformance/C25.0.11.CC b/Tests/Conformance/C25.0.11.CC index b8cfba2..7308d34 100644 --- a/Tests/Conformance/C25.0.11.CC +++ b/Tests/Conformance/C25.0.11.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -46,7 +46,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.11\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.11\n"); diff --git a/Tests/Conformance/C25.0.12.CC b/Tests/Conformance/C25.0.12.CC index df03e8b..8d539d8 100644 --- a/Tests/Conformance/C25.0.12.CC +++ b/Tests/Conformance/C25.0.12.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -46,7 +46,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.12\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.12\n"); diff --git a/Tests/Conformance/C25.0.13.CC b/Tests/Conformance/C25.0.13.CC index aa4d8f6..4753346 100644 --- a/Tests/Conformance/C25.0.13.CC +++ b/Tests/Conformance/C25.0.13.CC @@ -5,7 +5,7 @@ #include -main () +int main (void) { int i = 0; @@ -47,7 +47,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.13\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.13\n"); diff --git a/Tests/Conformance/C25.0.14.CC b/Tests/Conformance/C25.0.14.CC index f7ba199..1202a1d 100644 --- a/Tests/Conformance/C25.0.14.CC +++ b/Tests/Conformance/C25.0.14.CC @@ -5,7 +5,7 @@ #include -main () +int main (void) { int i = 0; @@ -47,7 +47,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.14\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.14\n"); diff --git a/Tests/Conformance/C25.0.15.CC b/Tests/Conformance/C25.0.15.CC index fb144af..c1ab25b 100644 --- a/Tests/Conformance/C25.0.15.CC +++ b/Tests/Conformance/C25.0.15.CC @@ -5,7 +5,7 @@ #include -main () +int main (void) { int i = 0; @@ -45,7 +45,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.15\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.15\n"); diff --git a/Tests/Conformance/C25.0.16.CC b/Tests/Conformance/C25.0.16.CC index bc6f381..f1a2e3b 100644 --- a/Tests/Conformance/C25.0.16.CC +++ b/Tests/Conformance/C25.0.16.CC @@ -5,7 +5,7 @@ #include -main () +int main (void) { int i = 0; @@ -45,7 +45,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.16\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.16\n"); diff --git a/Tests/Conformance/C25.0.17.CC b/Tests/Conformance/C25.0.17.CC index 1c94738..a1df1b0 100644 --- a/Tests/Conformance/C25.0.17.CC +++ b/Tests/Conformance/C25.0.17.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -46,7 +46,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.17\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.17\n"); diff --git a/Tests/Conformance/C25.0.18.CC b/Tests/Conformance/C25.0.18.CC index 80d3fe3..30cdc40 100644 --- a/Tests/Conformance/C25.0.18.CC +++ b/Tests/Conformance/C25.0.18.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -48,7 +48,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.18\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.18\n"); diff --git a/Tests/Conformance/C25.0.19.CC b/Tests/Conformance/C25.0.19.CC index 9abd13a..6e49bb8 100644 --- a/Tests/Conformance/C25.0.19.CC +++ b/Tests/Conformance/C25.0.19.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { int i = 0; @@ -65,7 +65,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.19\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.19\n"); diff --git a/Tests/Conformance/C25.0.2.CC b/Tests/Conformance/C25.0.2.CC index 3548bb6..9aa8ce6 100644 --- a/Tests/Conformance/C25.0.2.CC +++ b/Tests/Conformance/C25.0.2.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -81,7 +81,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.2\n"); diff --git a/Tests/Conformance/C25.0.20.CC b/Tests/Conformance/C25.0.20.CC index 2b13e1a..e09d330 100644 --- a/Tests/Conformance/C25.0.20.CC +++ b/Tests/Conformance/C25.0.20.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { int i = 0; @@ -113,7 +113,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.20\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.20\n"); diff --git a/Tests/Conformance/C25.0.21.CC b/Tests/Conformance/C25.0.21.CC index ec1b558..e4c16ca 100644 --- a/Tests/Conformance/C25.0.21.CC +++ b/Tests/Conformance/C25.0.21.CC @@ -5,7 +5,7 @@ #include -main () +int main (void) { int i = 0; @@ -47,7 +47,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.21\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.21\n"); diff --git a/Tests/Conformance/C25.0.22.CC b/Tests/Conformance/C25.0.22.CC index 9559457..026ca6e 100644 --- a/Tests/Conformance/C25.0.22.CC +++ b/Tests/Conformance/C25.0.22.CC @@ -7,7 +7,7 @@ #include -main () +int main (void) { int i = 0; @@ -77,7 +77,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.22\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.22\n"); diff --git a/Tests/Conformance/C25.0.23.CC b/Tests/Conformance/C25.0.23.CC index 94baaf1..97d2cc7 100644 --- a/Tests/Conformance/C25.0.23.CC +++ b/Tests/Conformance/C25.0.23.CC @@ -5,7 +5,7 @@ #include -main () +int main (void) { int i = 0; @@ -41,7 +41,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.23\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.23\n"); diff --git a/Tests/Conformance/C25.0.24.CC b/Tests/Conformance/C25.0.24.CC index 306b240..76f8356 100644 --- a/Tests/Conformance/C25.0.24.CC +++ b/Tests/Conformance/C25.0.24.CC @@ -7,7 +7,7 @@ #include -main () +int main (void) { int i = 0; @@ -63,7 +63,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.24\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.24\n"); diff --git a/Tests/Conformance/C25.0.25.CC b/Tests/Conformance/C25.0.25.CC index 2e9cb0a..20e9ae5 100644 --- a/Tests/Conformance/C25.0.25.CC +++ b/Tests/Conformance/C25.0.25.CC @@ -7,7 +7,7 @@ #include -main () +int main (void) { int i = 0; @@ -171,7 +171,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.25\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.25\n"); diff --git a/Tests/Conformance/C25.0.26.CC b/Tests/Conformance/C25.0.26.CC index 7be9f55..2f0744f 100644 --- a/Tests/Conformance/C25.0.26.CC +++ b/Tests/Conformance/C25.0.26.CC @@ -4,7 +4,7 @@ static int j; -void main(void) +int main(void) { static int i; diff --git a/Tests/Conformance/C25.0.3.CC b/Tests/Conformance/C25.0.3.CC index 53888f0..a7aaf94 100644 --- a/Tests/Conformance/C25.0.3.CC +++ b/Tests/Conformance/C25.0.3.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -81,7 +81,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.3\n"); diff --git a/Tests/Conformance/C25.0.4.CC b/Tests/Conformance/C25.0.4.CC index 54d7536..e406127 100644 --- a/Tests/Conformance/C25.0.4.CC +++ b/Tests/Conformance/C25.0.4.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -81,7 +81,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.4\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.4\n"); diff --git a/Tests/Conformance/C25.0.5.CC b/Tests/Conformance/C25.0.5.CC index 1475595..d380084 100644 --- a/Tests/Conformance/C25.0.5.CC +++ b/Tests/Conformance/C25.0.5.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -81,7 +81,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.5\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.5\n"); diff --git a/Tests/Conformance/C25.0.6.CC b/Tests/Conformance/C25.0.6.CC index 09b6a16..8dc88d3 100644 --- a/Tests/Conformance/C25.0.6.CC +++ b/Tests/Conformance/C25.0.6.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -81,7 +81,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.6\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.6\n"); diff --git a/Tests/Conformance/C25.0.7.CC b/Tests/Conformance/C25.0.7.CC index 970743e..4ed05bf 100644 --- a/Tests/Conformance/C25.0.7.CC +++ b/Tests/Conformance/C25.0.7.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -79,7 +79,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.7\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.7\n"); diff --git a/Tests/Conformance/C25.0.8.CC b/Tests/Conformance/C25.0.8.CC index 19fe43b..828ded0 100644 --- a/Tests/Conformance/C25.0.8.CC +++ b/Tests/Conformance/C25.0.8.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -46,7 +46,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.8\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.8\n"); diff --git a/Tests/Conformance/C25.0.9.CC b/Tests/Conformance/C25.0.9.CC index e714bf9..00887f2 100644 --- a/Tests/Conformance/C25.0.9.CC +++ b/Tests/Conformance/C25.0.9.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i = 0; @@ -81,7 +81,7 @@ main () if (i) goto Fail; printf ("Passed Conformance Test 25.0.9\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 25.0.9\n"); diff --git a/Tests/Conformance/C26.0.1.CC b/Tests/Conformance/C26.0.1.CC index c49841f..9bb89cf 100644 --- a/Tests/Conformance/C26.0.1.CC +++ b/Tests/Conformance/C26.0.1.CC @@ -63,7 +63,7 @@ #include #include -main () +int main (void) { printf ("Passed Conformance Test 26.0.1\n"); } diff --git a/Tests/Conformance/C3.3.0.1.CC b/Tests/Conformance/C3.3.0.1.CC index 4f306f2..0bca52e 100644 --- a/Tests/Conformance/C3.3.0.1.CC +++ b/Tests/Conformance/C3.3.0.1.CC @@ -1,9 +1,14 @@ /* Conformance Test 3.3.0.1: Ensure macro names are ignored in comments */ /* and string constants */ + +#include + +int printf(const char *, ...); + #define sum(x,y) x+y #define mult(x,y) x*y -main () +int main (void) { char a[25]; int x, y; @@ -19,7 +24,7 @@ main () goto Fail; printf ("Passed Conformance Test 3.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 3.3.0.1\n"); diff --git a/Tests/Conformance/C3.3.1.1.CC b/Tests/Conformance/C3.3.1.1.CC index 1d46a9c..a8d898f 100644 --- a/Tests/Conformance/C3.3.1.1.CC +++ b/Tests/Conformance/C3.3.1.1.CC @@ -1,17 +1,21 @@ /* Conformance Test 3.3.1.1: Verification of simple macro definitions */ +#include + +int printf(const char *, ...); + #define A_LONG_MACRO_NAME 7 * 3999 / 18 + count - digits; #define SUBSTITUTION a_variable #define EXPRESSION (3 + 21 / 6) -#define STRING"This string was made for testing, and that's just what\ +#define STRING "This string was made for testing, and that's just what\ it does" #define LABEL Fail #define begin { #define end } #define pass_msg ("Passed Conformance Test 3.3.1.1\n"); -#define letsSplit return +#define letsSplit return 0 -main () +int main (void) begin long SUBSTITUTION; char string [] = STRING; diff --git a/Tests/Conformance/C3.3.2.1.CC b/Tests/Conformance/C3.3.2.1.CC index 572c771..e486400 100644 --- a/Tests/Conformance/C3.3.2.1.CC +++ b/Tests/Conformance/C3.3.2.1.CC @@ -1,5 +1,7 @@ /* Conformance Test 3.3.2.1: Verification of macros with parameters */ +int printf(const char *, ...); + #define subtract(x,y) x - y #define noParmsPass() printf ("Passed Conformance Test 3.3.2.1\n"); #define noParmsFail() printf ("Failed Conformance Test 3.3.2.1\n"); @@ -7,7 +9,7 @@ a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z #define real float -main () +int main (void) { double f1(), g1(); int i; @@ -30,7 +32,7 @@ main () goto Fail; noParmsPass () - return; + return 0; Fail: noParmsFail () diff --git a/Tests/Conformance/C3.3.3.1.CC b/Tests/Conformance/C3.3.3.1.CC index 45aa225..d03aec9 100644 --- a/Tests/Conformance/C3.3.3.1.CC +++ b/Tests/Conformance/C3.3.3.1.CC @@ -1,11 +1,13 @@ /* Conformance Test 3.3.3.1: Ensure correct macro expansion for nested */ /* macros and nested macro calls */ +int printf(const char *, ...); + #define addMult(a,b,c) mult ( (add((a),(c))), (b) ) #define mult(x,y) (y) * (x) #define add(i,j) (i) + (j) -main () +int main (void) { long i, j, k, m; @@ -26,7 +28,7 @@ main () goto Fail; printf ("Passed Conformance Test 3.3.3.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 3.3.3.1\n"); diff --git a/Tests/Conformance/C3.3.4.1.CC b/Tests/Conformance/C3.3.4.1.CC index e60aa8d..2633d06 100644 --- a/Tests/Conformance/C3.3.4.1.CC +++ b/Tests/Conformance/C3.3.4.1.CC @@ -1,7 +1,11 @@ /* Conformance Test 3.3.4.1: Verification of ANSI C and ORCA/C predefined */ /* macros */ -main () +#include + +int printf(const char *, ...); + +int main (void) { int i, j; float x, y; @@ -23,7 +27,7 @@ main () goto Fail; printf ("Passed Conformance Test 3.3.4.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 3.3.4.1\n"); diff --git a/Tests/Conformance/C3.3.5.1.CC b/Tests/Conformance/C3.3.5.1.CC index 5045269..736780a 100644 --- a/Tests/Conformance/C3.3.5.1.CC +++ b/Tests/Conformance/C3.3.5.1.CC @@ -1,5 +1,7 @@ /* Conformance Test 3.3.5.1: Verification of undefining/redefining macros */ +int printf(const char *, ...); + #undef macroNotDefinedYet /* not an error to undefine an */ /* undefined macro */ #define macroNotDefinedYet 8 @@ -13,13 +15,13 @@ #undef A23__BD8 #define A23__BD8 "Passed Conformance Test 3.3.5.1\n" -main () +int main (void) { if (macroNotDefinedYet != 23) goto Fail; printf (A23__BD8); - return; + return 0; Fail: printf ("Failed Conformance Test 3.3.5.1\n"); diff --git a/Tests/Conformance/C3.3.6.1.CC b/Tests/Conformance/C3.3.6.1.CC index 8658321..d483177 100644 --- a/Tests/Conformance/C3.3.6.1.CC +++ b/Tests/Conformance/C3.3.6.1.CC @@ -1,11 +1,13 @@ /* Conformance Test 3.3.6.1: Verify precedence setting with parentheses */ /* in macro expansions */ +int printf(const char *, ...); + #define SQUARE1(x) x * x #define SQUARE2(x) (x) * (x) #define SQUARE3(x) ( (x) * (x) ) -main () +int main (void) { float y; int i; @@ -24,7 +26,7 @@ main () goto Fail; printf ("Passed Conformance Test 3.3.6.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 3.3.6.1\n"); diff --git a/Tests/Conformance/C3.3.8.1.CC b/Tests/Conformance/C3.3.8.1.CC index a880cfa..d428eea 100644 --- a/Tests/Conformance/C3.3.8.1.CC +++ b/Tests/Conformance/C3.3.8.1.CC @@ -1,11 +1,15 @@ /* Conformance Test 3.3.8.1: Verification of converting tokens to strings */ /* within macros */ +#include + +int printf(const char *, ...); + #define CnvToString1(a,b,c) "not a " #a " nor a c" #c " nor a m" #b\ " be me\n" #define CnvToString2(a,b,c) "a = " #a " b = " #b " c = "#c -main () +int main (void) { char string1[] = CnvToString1 (5, 276.145, 0x7F); char string2[] = CnvToString2 (4, 3, 0); @@ -16,7 +20,7 @@ main () goto Fail; printf ("Passed Conformance Test 3.3.8.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 3.3.8.1\n"); diff --git a/Tests/Conformance/C3.3.9.1.CC b/Tests/Conformance/C3.3.9.1.CC index 2fc3d85..aba7748 100644 --- a/Tests/Conformance/C3.3.9.1.CC +++ b/Tests/Conformance/C3.3.9.1.CC @@ -1,19 +1,21 @@ /* Conformance Test 3.3.9.1: Verification of token merging in macro */ /* expansions */ +int printf(const char *, ...); + #define INCR(j,k) j##k -main () +int main (void) { - int x; + int x, y; x = 3; - x = INCR (+, +) x; - if (x != 4) + y = INCR (+, +) x; + if (x != 4 || y != 4) goto Fail; printf ("Passed Conformance Test 3.3.9.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 3.3.9.1\n"); diff --git a/Tests/Conformance/C3.5.1.1.CC b/Tests/Conformance/C3.5.1.1.CC index 77a9da1..c419496 100644 --- a/Tests/Conformance/C3.5.1.1.CC +++ b/Tests/Conformance/C3.5.1.1.CC @@ -1,5 +1,7 @@ /* Conformance Test 3.5.1.1: Verification of #if constant expressions */ +int printf(const char *, ...); + #define FIVE 5 #define SIX 6 @@ -71,12 +73,12 @@ #if (defined(FIVE)) && (defined(SIX)) && (NUM1 == 0x10) && (NUM2 == 4)\ && (NUM3 == NUM2) -main () +int main (void) { printf ("Passed Conformance Test 3.5.1.1\n"); } #else -main () +int main (void) { printf ("Failed Conformance Test 3.5.1.1\n"); } diff --git a/Tests/Conformance/C3.5.1.2.CC b/Tests/Conformance/C3.5.1.2.CC index 4d74842..9befea1 100644 --- a/Tests/Conformance/C3.5.1.2.CC +++ b/Tests/Conformance/C3.5.1.2.CC @@ -1,5 +1,7 @@ /* Conformance Test 3.5.1.2: Verification of #if character constant expressions */ +int printf(const char *, ...); + #define FIVE '5' #define SIX '6' @@ -72,12 +74,12 @@ #if (defined(FIVE)) && (defined(SIX)) && (NUM1 == 0xAF8) && (NUM2 == 13)\ && (NUM3 == NUM2) -main () +int main (void) { printf ("Passed Conformance Test 3.5.1.2\n"); } #else -main () +int main (void) { printf ("Failed Conformance Test 3.5.1.2\n"); } diff --git a/Tests/Conformance/C3.5.1.3.CC b/Tests/Conformance/C3.5.1.3.CC index d8bd2ff..0803fd7 100644 --- a/Tests/Conformance/C3.5.1.3.CC +++ b/Tests/Conformance/C3.5.1.3.CC @@ -1,15 +1,17 @@ /* Conformance Test 3.5.1.3: Verify macro expansion in #if commands */ +int printf(const char *, ...); + #define VAL1 1 #undef VAL1 #if !VAL1 /* VAL1 should be undefined, and so evaluate as 0 */ -main () +int main (void) { printf ("Passed Conformance Test 3.5.1.3\n"); } #else -main () +int main (void) { printf ("Failed Conformance Test 3.5.1.3\n"); } diff --git a/Tests/Conformance/C3.5.1.4.CC b/Tests/Conformance/C3.5.1.4.CC index 3ea3d43..9a43217 100644 --- a/Tests/Conformance/C3.5.1.4.CC +++ b/Tests/Conformance/C3.5.1.4.CC @@ -1,6 +1,8 @@ /* Conformance Test 3.5.1.4: Verification of macro expansions in #if */ /* commands */ +int printf(const char *, ...); + #define ONE 1 #define TWO 2 #define THREE 3 @@ -81,12 +83,12 @@ #if (defined(FIVE)) && (defined(SIX)) && (NUM1 == 54) && (NUM2 == 18)\ && (NUM3 == NUM2) -main () +int main (void) { printf ("Passed Conformance Test 3.5.1.4\n"); } #else -main () +int main (void) { printf("%d %d %d\n", NUM1, NUM2, NUM3); printf ("Failed Conformance Test 3.5.1.4\n"); diff --git a/Tests/Conformance/C3.5.1.5.CC b/Tests/Conformance/C3.5.1.5.CC index 2154fde..72fdef2 100644 --- a/Tests/Conformance/C3.5.1.5.CC +++ b/Tests/Conformance/C3.5.1.5.CC @@ -1,6 +1,8 @@ /* Conformance Test 3.5.1.5: Ensure #if, #else with no lines to compile */ /* are not errors */ +int printf(const char *, ...); + #if 5 #else #endif @@ -21,7 +23,7 @@ #define fail 0 #endif -main () +int main (void) { if (TRUE != 1) goto Fail; @@ -30,7 +32,7 @@ main () goto Fail; printf ("Passed Conformance Test 3.5.1.5\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 3.5.1.5\n"); diff --git a/Tests/Conformance/C3.5.2.1.CC b/Tests/Conformance/C3.5.2.1.CC index cc3d9e3..610532c 100644 --- a/Tests/Conformance/C3.5.2.1.CC +++ b/Tests/Conformance/C3.5.2.1.CC @@ -1,5 +1,7 @@ /* Conformance Test 3.5.2.1: Verification of #elif command */ +int printf(const char *, ...); + #if 0 # define MSG "Failed Conformance Test 3.5.2.1; location 1\n" @@ -31,7 +33,7 @@ # define MSG "Failed Conformance Test 3.5.2.1; location 9\n" #endif -main () +int main (void) { printf (MSG); } diff --git a/Tests/Conformance/C3.5.2.2.CC b/Tests/Conformance/C3.5.2.2.CC index 4a339ae..d724cc6 100644 --- a/Tests/Conformance/C3.5.2.2.CC +++ b/Tests/Conformance/C3.5.2.2.CC @@ -1,6 +1,8 @@ /* Conformance Test 3.5.2.2: Verification of #elif command, using macro */ /* substitution */ +int printf(const char *, ...); + #define MACRO1(x,y,z) ((x) + (y) * (z)) #define PASS "Passed Conformance Test 3.5.2.2\n" #define FAIL "Failed Conformance Test 3.5.2.2\n" @@ -54,7 +56,7 @@ # define MSG FAIL #endif -main () +int main (void) { printf (MSG); } diff --git a/Tests/Conformance/C3.5.2.3.CC b/Tests/Conformance/C3.5.2.3.CC index a02e12d..f69a584 100644 --- a/Tests/Conformance/C3.5.2.3.CC +++ b/Tests/Conformance/C3.5.2.3.CC @@ -1,9 +1,11 @@ /* Conformance Test 3.5.2.3: Verification of nested #elif commands */ +int printf(const char *, ...); + #define PASS "Passed Conformance Test 3.5.2.3\n" #define FAIL "Failed Conformance Test 3.5.2.3\n" -main () +int main (void) { #if 1 #if 2 diff --git a/Tests/Conformance/C3.5.2.4.CC b/Tests/Conformance/C3.5.2.4.CC index 5000426..1217065 100644 --- a/Tests/Conformance/C3.5.2.4.CC +++ b/Tests/Conformance/C3.5.2.4.CC @@ -1,13 +1,15 @@ /* Conformance Test 3.5.2.4: Verification of nested #elif commands, using */ /* macro substitution */ +int printf(const char *, ...); + #define PASS "Passed Conformance Test 3.5.2.4\n" #define FAIL "Failed Conformance Test 3.5.2.4\n" #define CALL1(a,b,c) ((a) - (b) * (c)) #define CALL2(x,y) ((x) || (y)) -main () +int main (void) { #if CALL1 (6,2,3) #if CALL1 (8,2,4) diff --git a/Tests/Conformance/C3.5.3.1.CC b/Tests/Conformance/C3.5.3.1.CC index a0cb089..7119f3c 100644 --- a/Tests/Conformance/C3.5.3.1.CC +++ b/Tests/Conformance/C3.5.3.1.CC @@ -1,5 +1,7 @@ /* Conformance Test 3.5.3.1: Verification of #ifdef and #ifndef commands */ +int printf(const char *, ...); + #define ONE 1 #define TWO 2 #define THREE 3 @@ -42,7 +44,7 @@ #define COUNT8 8 #endif -main () +int main (void) { int a; @@ -50,7 +52,7 @@ main () if (a != 36) goto Fail; printf ("Passed Conformance Test 3.5.3.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 3.5.3.1\n"); diff --git a/Tests/Conformance/C3.5.4.1.CC b/Tests/Conformance/C3.5.4.1.CC index f996ba9..b85cce8 100644 --- a/Tests/Conformance/C3.5.4.1.CC +++ b/Tests/Conformance/C3.5.4.1.CC @@ -1,5 +1,7 @@ /* Conformance Test 3.5.4.1: Verification of #elif constant expressions */ +int printf(const char *, ...); + #define FIVE 5 #define SIX 6 @@ -117,7 +119,7 @@ #define NUM15 0 #endif -main () +int main (void) { if ( ! ((FIVE == 5) && (1 == NUM10)) ) goto Fail; @@ -139,7 +141,7 @@ main () if (NUM15 != 1 ) goto Fail; printf ("Passed Conformance Test 3.5.4.1\n"); - return; + return 0; Fail: printf ("Passed Conformance Test 3.5.4.1\n"); diff --git a/Tests/Conformance/C3.5.4.2.CC b/Tests/Conformance/C3.5.4.2.CC index db8bb87..ad4ff4d 100644 --- a/Tests/Conformance/C3.5.4.2.CC +++ b/Tests/Conformance/C3.5.4.2.CC @@ -1,6 +1,8 @@ /* Conformance Test 3.5.4.2: Verification of #elif character constant */ /* expressions */ +int printf(const char *, ...); + #define FIVE '5' #define SIX '6' @@ -128,7 +130,7 @@ #if 0 #elif (defined(FIVE)) && (defined(SIX)) && (NUM1 == 0xAF0) && (NUM2 == 1)\ && (NUM3 == NUM2) -main () +int main (void) { if (NUM1 != 2800 ) goto Fail; if (NUM2 != 1 ) goto Fail; @@ -147,14 +149,14 @@ main () if ((NUM15) != 1 ) goto Fail; printf ("Passed Conformance Test 3.5.4.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 3.5.4.2; location 1\n"); } #else -main () +int main (void) { printf ("Failed Conformance Test 3.5.4.2; location 2\n"); } diff --git a/Tests/Conformance/C4.2.1.1.CC b/Tests/Conformance/C4.2.1.1.CC index 0b6aa95..66c9b08 100644 --- a/Tests/Conformance/C4.2.1.1.CC +++ b/Tests/Conformance/C4.2.1.1.CC @@ -5,6 +5,8 @@ #include +int printf(const char *, ...); + #define MAC_NAME1 10 /* macro name */ typedef int *intPtr; /* user-defined type */ @@ -21,7 +23,7 @@ union LongOrShort { long longNum; /* type tag name */ enum flowers { rose, iris, carnation }; /* type tag name */ /* and enum const */ -main () +int main (void) { char ch; int m; @@ -58,13 +60,13 @@ main () goto Fail; printf ("Passed Conformance Test 4.2.1.1\n"); - return; + return 0; printf ("This code can never be reached !!!\n"); Fail: printf ("Failed Conformance Test 4.2.1.1\n"); - return; + return 0; printf ("Nor can this code ever be reached !!!\n"); } diff --git a/Tests/Conformance/C4.2.2.1.CC b/Tests/Conformance/C4.2.2.1.CC index 1ff2858..d5d8c04 100644 --- a/Tests/Conformance/C4.2.2.1.CC +++ b/Tests/Conformance/C4.2.2.1.CC @@ -4,6 +4,8 @@ #include +int printf(const char *, ...); + typedef int *numPtr; /* user-defined type */ float f; /* variables */ @@ -29,7 +31,7 @@ int i (char ch) /******************************************************************************/ -main () +int main (void) { int i; typedef float *numPtr; /* redefine the global types */ @@ -75,7 +77,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.2.2.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.2.2.1\n"); diff --git a/Tests/Conformance/C4.2.4.1.CC b/Tests/Conformance/C4.2.4.1.CC index 39468cd..8df9943 100644 --- a/Tests/Conformance/C4.2.4.1.CC +++ b/Tests/Conformance/C4.2.4.1.CC @@ -1,6 +1,10 @@ /* Conformance Test 4.2.4.1: Ensure the same names in different overloading */ /* classes are allowed */ +#include + +int printf(const char *, ...); + struct rect { int h1; /* struct, union, enum type tags */ int v1; /* struct/union components */ int h2; @@ -13,7 +17,7 @@ enum repeats { h1, v1, h2, v2, first, second }; /* all others: variables, */ /* functions, typedefs, */ /* enumeration constants*/ -main () +int main (void) { int rect; /* can give variables same */ double longOrShort; /* names as labels, tags,*/ @@ -88,7 +92,7 @@ main () goto label; printf ("Passed Conformance Test 4.2.4.1\n"); - return; + return 0; label: ; Label2: ; diff --git a/Tests/Conformance/C4.2.5.1.CC b/Tests/Conformance/C4.2.5.1.CC index 1ea5870..0d5ab8f 100644 --- a/Tests/Conformance/C4.2.5.1.CC +++ b/Tests/Conformance/C4.2.5.1.CC @@ -1,9 +1,11 @@ /* Conformance Test 4.2.5.1: Verification of duplicate extern references */ +int printf(const char *, ...); + int a; extern float F1 (int x, int y); -main () +int main (void) { extern int a; extern float F1 (int x, int y); @@ -19,7 +21,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.2.5.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.2.5.1\n"); diff --git a/Tests/Conformance/C4.3.0.1.CC b/Tests/Conformance/C4.3.0.1.CC index a94fd36..d286198 100644 --- a/Tests/Conformance/C4.3.0.1.CC +++ b/Tests/Conformance/C4.3.0.1.CC @@ -1,6 +1,8 @@ /* Conformance Test 4.3.0.1: Verification of auto, register, and static */ /* storage classes */ +int printf(const char *, ...); + static long L1 (register int a1, float x1); /* test forward referencing */ /* at top level */ @@ -9,7 +11,7 @@ static int j = 2; /* initialized correctly */ static int i; /* should automatically be */ /* set to zero */ -main () +int main (void) { static void V1 (void); /* test forward referencing within */ /* function */ @@ -19,7 +21,7 @@ main () goto Fail; { - auto i = 10; /* this i hides top-level i */ + int auto i = 10; /* this i hides top-level i */ for (; i < 15; i++) { V1 (); @@ -71,7 +73,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.3.0.1\n"); diff --git a/Tests/Conformance/C4.3.0.2.CC b/Tests/Conformance/C4.3.0.2.CC index 9030f8b..59e6ba1 100644 --- a/Tests/Conformance/C4.3.0.2.CC +++ b/Tests/Conformance/C4.3.0.2.CC @@ -1,5 +1,7 @@ /* Conformance Test 4.3.0.2: Check uniqueness of static variables */ +int printf(const char *, ...); + static int var; int sub1(void) @@ -44,7 +46,7 @@ return 0; } -void main (void) +int main (void) { var = 1; @@ -54,7 +56,7 @@ if (sub2()) goto Fail; if (var != 1) goto Fail; printf ("Passed Conformance Test 4.3.0.2\n"); -return; +return 0; Fail: printf ("Failed Conformance Test 4.3.0.2\n"); } diff --git a/Tests/Conformance/C4.4.2.1.CC b/Tests/Conformance/C4.4.2.1.CC index 499e101..3860e3a 100644 --- a/Tests/Conformance/C4.4.2.1.CC +++ b/Tests/Conformance/C4.4.2.1.CC @@ -1,5 +1,7 @@ /* Conformance Test 4.4.2.1: Ensure compile accepts missing declarators */ +int printf(const char *, ...); + extern struct S; /* forward-declared struct type, */ /* storage class ignored */ @@ -11,7 +13,7 @@ struct S; static enum E {a, b, c}; /* storage class ignored */ extern enum {x, y, z}; -main () +int main (void) { struct S; /* different from the global one */ volatile const register struct T; diff --git a/Tests/Conformance/C4.5.2.1.CC b/Tests/Conformance/C4.5.2.1.CC index 8c75e90..7b729c6 100644 --- a/Tests/Conformance/C4.5.2.1.CC +++ b/Tests/Conformance/C4.5.2.1.CC @@ -3,7 +3,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int *intPtr, i; /* pointers to all the basic types */ long *longPtr, L; @@ -96,7 +98,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.5.2.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.5.2.1\n"); diff --git a/Tests/Conformance/C4.5.2.2.CC b/Tests/Conformance/C4.5.2.2.CC index 011cfe5..fc81529 100644 --- a/Tests/Conformance/C4.5.2.2.CC +++ b/Tests/Conformance/C4.5.2.2.CC @@ -3,7 +3,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { /* pointers to all the basic types */ typedef int *intPtr; @@ -134,7 +136,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.5.2.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.5.2.2\n"); diff --git a/Tests/Conformance/C4.5.2.3.CC b/Tests/Conformance/C4.5.2.3.CC index 2935d3f..f5f5cd5 100644 --- a/Tests/Conformance/C4.5.2.3.CC +++ b/Tests/Conformance/C4.5.2.3.CC @@ -3,6 +3,8 @@ #include +int printf(const char *, ...); + /* pointers to all the basic types */ static int *intPtr, i; static long *longPtr, L; @@ -22,7 +24,7 @@ static enum colors { red, black, green } *colorPtr, color; static union longOrShort { int first; long second; } *unionPtr, un; -main () +int main (void) { void F1 (void); F1(); diff --git a/Tests/Conformance/C4.5.3.1.CC b/Tests/Conformance/C4.5.3.1.CC index 961a012..6ebecce 100644 --- a/Tests/Conformance/C4.5.3.1.CC +++ b/Tests/Conformance/C4.5.3.1.CC @@ -2,7 +2,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { char ch; int i, j, k, n; /* loop indices */ @@ -238,7 +240,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.5.3.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.5.3.1\n"); diff --git a/Tests/Conformance/C4.5.3.2.CC b/Tests/Conformance/C4.5.3.2.CC index a22eb6b..ca9c01e 100644 --- a/Tests/Conformance/C4.5.3.2.CC +++ b/Tests/Conformance/C4.5.3.2.CC @@ -2,6 +2,8 @@ #include +int printf(const char *, ...); + static int i1 [50], i3 [3] [5] [8]; /* all basic types */ static long L1 [9], L2 [2] [6]; @@ -26,7 +28,7 @@ union longOrShort { int first; long second; }; static union longOrShort u2 [3] [3], u1 [12]; -main () +int main (void) { static int TestArray (void); diff --git a/Tests/Conformance/C4.5.3.3.CC b/Tests/Conformance/C4.5.3.3.CC index c614ca3..679a6ce 100644 --- a/Tests/Conformance/C4.5.3.3.CC +++ b/Tests/Conformance/C4.5.3.3.CC @@ -3,7 +3,9 @@ #include -main () +int printf(const char *, ...); + +int main (void) { int i, j, k, n; /* loop indices */ long L; /* l-values */ @@ -122,7 +124,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.5.3.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.5.3.3\n"); diff --git a/Tests/Conformance/C4.5.3.4.CC b/Tests/Conformance/C4.5.3.4.CC index 96c4033..7463091 100644 --- a/Tests/Conformance/C4.5.3.4.CC +++ b/Tests/Conformance/C4.5.3.4.CC @@ -3,6 +3,8 @@ #include +int printf(const char *, ...); + static int *i1 [50]; /* all basic types */ static long *L1 [9]; static comp *c1 [3]; @@ -27,7 +29,7 @@ union longOrShort { int first; static union longOrShort *u1 [12], U; -main () +int main (void) { static int TestEm (void); diff --git a/Tests/Conformance/C4.5.4.1.CC b/Tests/Conformance/C4.5.4.1.CC index fe10554..d938d5b 100644 --- a/Tests/Conformance/C4.5.4.1.CC +++ b/Tests/Conformance/C4.5.4.1.CC @@ -24,7 +24,7 @@ static int I2 (int (*func []) (char a)) /***************************************************************************/ -main () +int main (void) { int i; @@ -67,7 +67,7 @@ main () printf ("Passed Conformance Test 4.5.4.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.5.4.1\n"); diff --git a/Tests/Conformance/C4.5.4.2.CC b/Tests/Conformance/C4.5.4.2.CC index d7f961a..0addef0 100644 --- a/Tests/Conformance/C4.5.4.2.CC +++ b/Tests/Conformance/C4.5.4.2.CC @@ -28,7 +28,7 @@ static int I2 (func) /***************************************************************************/ -main () +int main () { int i; @@ -65,7 +65,7 @@ main () printf ("Passed Conformance Test 4.5.4.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.5.4.2\n"); diff --git a/Tests/Conformance/C4.6.1.1.CC b/Tests/Conformance/C4.6.1.1.CC index 2cb68ed..6de3ba0 100644 --- a/Tests/Conformance/C4.6.1.1.CC +++ b/Tests/Conformance/C4.6.1.1.CC @@ -1,5 +1,7 @@ /* Conformance Test 4.6.1.1: Initialization of integer variables */ +int printf(const char *, ...); + #define ONE 1 #define TWO 2 @@ -12,7 +14,7 @@ char ch = ~'a' - 0x20; int gk = 0x7D; unsigned gu1 = 0x7D; -main () +int main (void) { /* auto & register integers can be initialized with arbitrary expressions */ /* default storage class at head of block is auto */ @@ -40,7 +42,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.6.1.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.1.1\n"); diff --git a/Tests/Conformance/C4.6.1.2.CC b/Tests/Conformance/C4.6.1.2.CC index 638b0b7..b535d84 100644 --- a/Tests/Conformance/C4.6.1.2.CC +++ b/Tests/Conformance/C4.6.1.2.CC @@ -3,6 +3,8 @@ /* zeroing of non-initialized static variables */ /* is also checked. */ +int printf(const char *, ...); + #define ONE 1 #define TWO 2 @@ -13,7 +15,7 @@ static int i; long j = { ONE <= 5 }; /* default storage class at top-level is extern */ char ch = {~'a' - 0x20}; -main () +int main (void) { /* auto & register integers can be initialized with arbitrary expressions */ /* default storage class at head of block is auto */ @@ -44,7 +46,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.6.1.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.1.2\n"); diff --git a/Tests/Conformance/C4.6.2.1.CC b/Tests/Conformance/C4.6.2.1.CC index f55e143..fb28e25 100644 --- a/Tests/Conformance/C4.6.2.1.CC +++ b/Tests/Conformance/C4.6.2.1.CC @@ -4,6 +4,8 @@ #include +int printf(const char *, ...); + static float f1 = -1.0E2 + (float) 2 * 5.0 / 20.0 - (double) 6; static double d1 = 89.76E5 * 17.6 - (extended) 1 + (float) (-3) / 8.; static extended e1 = 9.9 * 7.1 + 0.03 - (extended) 2 / (float) (0 && 3.0 || 2); @@ -12,7 +14,7 @@ float f2 = 5.1 * 7 - 88 / 4 + (extended) (double) (float) 8; double d2 = 10.0e20 / 0.04E-6; extended e2 = 15.5 - .5 * 3 + 1; -main () +int main (void) { /* auto and register variables can use any arithmetic expression */ @@ -61,7 +63,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.6.2.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.2.1\n"); diff --git a/Tests/Conformance/C4.6.2.2.CC b/Tests/Conformance/C4.6.2.2.CC index 0470d66..c757a3b 100644 --- a/Tests/Conformance/C4.6.2.2.CC +++ b/Tests/Conformance/C4.6.2.2.CC @@ -7,6 +7,8 @@ #include +int printf(const char *, ...); + static float f1 = { -1.0E2 + (float) 2 * 5.0 / 20.0 - (double) 6 }; static double d1 = { 89.76E5 * 17.6 - (extended) 1 + (float) (-3) / 8.0 }; static extended e1; @@ -16,7 +18,7 @@ float f2 = 5.1 * 7 - 88 / 4 + (extended) (double) (float) 8; double d2 = { 10.0e20 / 0.04E-6 }; extended e2 = 15.5 - .5 * 3 + 1; -main () +int main (void) { static double d0; @@ -74,7 +76,7 @@ main () printf ("Passed Conformance Test 4.6.2.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.2.2\n"); diff --git a/Tests/Conformance/C4.6.3.1.CC b/Tests/Conformance/C4.6.3.1.CC index 7a8b7e5..25e909b 100644 --- a/Tests/Conformance/C4.6.3.1.CC +++ b/Tests/Conformance/C4.6.3.1.CC @@ -4,6 +4,8 @@ #include +int printf(const char *, ...); + struct S { int a; float b; }; union U { int i; @@ -40,7 +42,7 @@ struct S *struct2Ptr = NULL; union U *union2Ptr = NULL; enum E *enum2Ptr = NULL; -main () +int main (void) { /* local pointer variables can also be set to NULL */ @@ -93,7 +95,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.6.3.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.3.1\n"); diff --git a/Tests/Conformance/C4.6.3.2.CC b/Tests/Conformance/C4.6.3.2.CC index 74c323b..2f1c260 100644 --- a/Tests/Conformance/C4.6.3.2.CC +++ b/Tests/Conformance/C4.6.3.2.CC @@ -2,6 +2,8 @@ #include +int printf(const char *, ...); + struct S { int a; float b; }; union U { int i; @@ -40,7 +42,7 @@ extended E1 (void) /******************************************************************************/ -main () +int main (void) { static int IDisp (int (*func) (void)); /* declare dispatcher rtns */ @@ -151,7 +153,7 @@ main () printf ("Passed Conformance Test 4.6.3.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.3.2\n"); diff --git a/Tests/Conformance/C4.6.4.1.CC b/Tests/Conformance/C4.6.4.1.CC index bf93c16..3f9f359 100644 --- a/Tests/Conformance/C4.6.4.1.CC +++ b/Tests/Conformance/C4.6.4.1.CC @@ -2,6 +2,7 @@ #include #include +#include /* Check size supplied by compiler */ @@ -30,7 +31,7 @@ struct S2 { char ch1, ch2; double d1, d2; } s2 [4] = { {'a', 'b', 3.3, 4.4}, {'l', 'm', 3.5, 4.6} }; -main () +int main (void) { int i, j, k, m; /* local variables */ double d3; @@ -83,8 +84,8 @@ main () if (strcmp (ch1, "Now is the time")) /* ch1 */ goto Fail; - if ((strcmp (&ch2 [1], "to come to the aid ")) || /* ch2 */ - (strcmp (&ch2 [0], "for all good people"))) + if ((strcmp (ch2 [1], "to come to the aid ")) || /* ch2 */ + (strcmp (ch2 [0], "for all good people"))) goto Fail; for (d3 = 5.4, i = 0; i < 4; i++) /* d1 */ @@ -176,7 +177,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.6.4.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.4.1\n"); diff --git a/Tests/Conformance/C4.6.4.2.CC b/Tests/Conformance/C4.6.4.2.CC index 58c2e38..e549718 100644 --- a/Tests/Conformance/C4.6.4.2.CC +++ b/Tests/Conformance/C4.6.4.2.CC @@ -2,8 +2,9 @@ #include #include +#include -main () +int main (void) { int i, j, k, m; /* local variables */ double d3; @@ -176,7 +177,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.6.4.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.4.2\n"); diff --git a/Tests/Conformance/C4.6.4.3.CC b/Tests/Conformance/C4.6.4.3.CC index ecc777a..f174677 100644 --- a/Tests/Conformance/C4.6.4.3.CC +++ b/Tests/Conformance/C4.6.4.3.CC @@ -43,7 +43,7 @@ int *ip[27] = { &tensor[2][2][2] }; -main() +int main(void) { int i; diff --git a/Tests/Conformance/C4.6.5.1.CC b/Tests/Conformance/C4.6.5.1.CC index 6208a00..3db9360 100644 --- a/Tests/Conformance/C4.6.5.1.CC +++ b/Tests/Conformance/C4.6.5.1.CC @@ -1,9 +1,11 @@ /* Conformance Test 4.6.5.1: Verification of enumeration initializations */ +int printf(const char *, ...); + static enum E1 { a, b, c } e1 = b; enum E2 { d, e } e2 = e; -main () +int main (void) { enum E3 { f, g, h } e3 = f; { enum E3 e4 = e3; @@ -18,7 +20,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.6.5.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.5.1\n"); diff --git a/Tests/Conformance/C4.6.6.1.CC b/Tests/Conformance/C4.6.6.1.CC index 057c6d3..2c46626 100644 --- a/Tests/Conformance/C4.6.6.1.CC +++ b/Tests/Conformance/C4.6.6.1.CC @@ -2,6 +2,7 @@ /* initialization */ #include +#include #include struct S1 { int i; @@ -41,7 +42,7 @@ struct S3 s6 = { { 7654, 'x', 65535, 876.0, 877.0, 878.0, 033 }, { 0x01 } } }; -main () +int main (void) { int i, j; long k; @@ -149,7 +150,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.6.6.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.6.1\n"); diff --git a/Tests/Conformance/C4.6.6.2.CC b/Tests/Conformance/C4.6.6.2.CC index b0f60b5..9ee7fd0 100644 --- a/Tests/Conformance/C4.6.6.2.CC +++ b/Tests/Conformance/C4.6.6.2.CC @@ -2,6 +2,7 @@ /* initialization */ #include +#include #include struct S1 { int i; @@ -25,7 +26,7 @@ struct S3 { struct S1 s1; struct S2 s2; }; -main () +int main (void) { int i, j; long k; @@ -40,12 +41,12 @@ main () register struct S1 s1 = { 1, 'a', -2147483647, 4.3, 4.3e100, 4.3e300, 0xFF }; - register struct S2 s2 = { { 1, 2, 3, 4, 5 }, "an array ", { 8, 9, 10 }, + auto struct S2 s2 = { { 1, 2, 3, 4, 5 }, "an array ", { 8, 9, 10 }, { 5.1, 5.2, 5.3, 5.4 }, { 5.1e50, 5.2e50, 5.3e50 }, { 5.1e200, 5.2e200, 5.3e200 }, { 0xFFFF, 0xFFFE, 0xFFFD } }; - register struct S3 s3 = { { 9, 'd', 80000, 88.9, 88.99, 888.999, 0x33 }, + auto struct S3 s3 = { { 9, 'd', 80000, 88.9, 88.99, 888.999, 0x33 }, { { 9, 8, 7, 6, 5 }, "ten chars", { 32768, 32769, 32770 }, { 6.0, 7.0, 8.0, 9.0 }, { 66.0, 77.0, 88.0, }, { 666.0, 777.0 }, @@ -262,7 +263,7 @@ main () printf ("Passed Conformance Test 4.6.6.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.6.2\n"); diff --git a/Tests/Conformance/C4.6.7.1.CC b/Tests/Conformance/C4.6.7.1.CC index 3c4cc8f..3d50bf0 100644 --- a/Tests/Conformance/C4.6.7.1.CC +++ b/Tests/Conformance/C4.6.7.1.CC @@ -1,5 +1,7 @@ /* Conformance Test 4.6.7.1: Verification of union initialization */ +int printf(const char *, ...); + union U1 { int i; long L; float f; }; @@ -7,7 +9,7 @@ union U1 { int i; union U1 u1 = { 3 }; static union U1 u2 = { 5 }; -main () +int main (void) { auto union U1 u3 = { 32767 }; @@ -21,7 +23,7 @@ main () goto Fail; printf ("Passed Conformance Test 4.6.7.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 4.6.7.1\n"); diff --git a/Tests/Conformance/C6.2.3.1.CC b/Tests/Conformance/C6.2.3.1.CC index a88f94a..53cb2f8 100644 --- a/Tests/Conformance/C6.2.3.1.CC +++ b/Tests/Conformance/C6.2.3.1.CC @@ -1,8 +1,9 @@ /* Conformance Test 5.11.0.1: Verification of type equivalence: int types */ #include +#include -main () +int main (void) { char ch = 'Z'; int i = 80, k; @@ -35,7 +36,7 @@ main () printf ("Passed Conformance Test 6.2.3.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 6.2.3.1\n"); diff --git a/Tests/Conformance/C6.2.3.2.CC b/Tests/Conformance/C6.2.3.2.CC index d311032..aef8ea6 100644 --- a/Tests/Conformance/C6.2.3.2.CC +++ b/Tests/Conformance/C6.2.3.2.CC @@ -1,8 +1,9 @@ /* Conformance Test 6.2.3.2: Verification of type equivalence: long types */ #include +#include -main () +int main (void) { signed char ch; int i; @@ -30,7 +31,7 @@ main () TestCnv (L, L, L, L, L, L, L, L); printf ("Passed Conformance Test 6.2.3.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 6.2.3.2\n"); diff --git a/Tests/Conformance/C6.2.3.3.CC b/Tests/Conformance/C6.2.3.3.CC index 3071618..95d7b93 100644 --- a/Tests/Conformance/C6.2.3.3.CC +++ b/Tests/Conformance/C6.2.3.3.CC @@ -1,8 +1,9 @@ /* Conformance Test 6.2.3.3: Verification of type equivalence: long types */ #include +#include -main () +int main (void) { signed char ch; int i; @@ -30,7 +31,7 @@ main () TestCnv (uL, uL, uL, uL, uL, uL, uL, uL); printf ("Passed Conformance Test 6.2.3.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 6.2.3.3\n"); diff --git a/Tests/Conformance/C6.2.3.4.CC b/Tests/Conformance/C6.2.3.4.CC index 627d500..8f9e07f 100644 --- a/Tests/Conformance/C6.2.3.4.CC +++ b/Tests/Conformance/C6.2.3.4.CC @@ -1,8 +1,9 @@ /* Conformance Test 6.2.3.4: Verification of type equivalence: long types */ #include +#include -main () +int main (void) { signed char ch = 0x87; int i = -32767; @@ -31,7 +32,7 @@ main () printf ("Passed Conformance Test 6.2.3.4\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 6.2.3.4\n"); diff --git a/Tests/Conformance/C6.2.3.5.CC b/Tests/Conformance/C6.2.3.5.CC index 1950ff1..dcbf018 100644 --- a/Tests/Conformance/C6.2.3.5.CC +++ b/Tests/Conformance/C6.2.3.5.CC @@ -2,9 +2,10 @@ /* to integer types */ #include +#include #include -main () +int main (void) { float f; double d; @@ -41,7 +42,7 @@ main () goto Fail; printf ("Passed Conformance Test 6.2.3.5\n"); - return; + return 0; Fail: printf ("Passed Conformance Test 6.2.3.5\n"); diff --git a/Tests/Conformance/C7.10.0.1.CC b/Tests/Conformance/C7.10.0.1.CC index 8484baf..80ca97f 100644 --- a/Tests/Conformance/C7.10.0.1.CC +++ b/Tests/Conformance/C7.10.0.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i = 5; long L = 32777; @@ -20,16 +20,16 @@ main () i = (i++ * 2, i -= 2, 88); L = (ch *= 2, ch--, 3000); - ch = ('a' || 'b', ch++); + ch = ('a' || 'b', ch++, ch); c = -9, 888, f * 3.3; f = 1.1 + f, f -= 57, f+=1.0; d = (L, uch, -f); e = 8 + e, e -= 0.33, e / 2; ui = ui * 3, ui--, ui; - ul = ul >>= 5, ul & 0x0, ul++; + ul = (ul >>= 5, ul & 0x0, ul++, ul); uch = (2 + uch, 'Y'); - if ((i != 88) || (L != 3000) || (ch != 'A') || (ui != 1958) || + if ((i != 88) || (L != 3000) || (ch != 'B') || (ui != 1958) || (ul != 28) || (uch != 'Y') || (fabs(c -(- 9.0)) > 0.00001) || (fabs(f - (-51.4)) > 0.00001) || (fabs(d - 51.40) > 0.00001) || (fabs(e - 100.000) > 0.00001)) @@ -37,7 +37,7 @@ main () printf ("Passed Conformance Test 7.10.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.10.0.1\n"); diff --git a/Tests/Conformance/C7.4.1.1.CC b/Tests/Conformance/C7.4.1.1.CC index 45c3ee5..4f669b5 100644 --- a/Tests/Conformance/C7.4.1.1.CC +++ b/Tests/Conformance/C7.4.1.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i [5] = { 1, 2, 3, 4, 5 }, *iptr = i; struct S { float f; char ch; } s = { 2.2, 'k' }, *sptr = &s; @@ -28,7 +28,7 @@ main () printf ("Passed Conformance Test 7.4.1.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.4.1.1\n"); diff --git a/Tests/Conformance/C7.4.4.1.CC b/Tests/Conformance/C7.4.4.1.CC index ee446f9..6fe5c7d 100644 --- a/Tests/Conformance/C7.4.4.1.CC +++ b/Tests/Conformance/C7.4.4.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i = 5, j; long L = 32777; @@ -43,7 +43,7 @@ main () goto Fail; printf ("Passed Conformance Test 7.4.4.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.4.4.1\n"); diff --git a/Tests/Conformance/C7.4.5.1.CC b/Tests/Conformance/C7.4.5.1.CC index 1884918..e6714f7 100644 --- a/Tests/Conformance/C7.4.5.1.CC +++ b/Tests/Conformance/C7.4.5.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { int i = 5; long L = 32777; @@ -25,7 +25,7 @@ main () printf ("Passed Conformance Test 7.4.5.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.4.5.1\n"); diff --git a/Tests/Conformance/C7.5.1.1.CC b/Tests/Conformance/C7.5.1.1.CC index 9204834..1e4cfe0 100644 --- a/Tests/Conformance/C7.5.1.1.CC +++ b/Tests/Conformance/C7.5.1.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { signed char ch = 'Z'; int i = 80, j, k [7]; @@ -52,7 +52,7 @@ main () goto Fail; printf ("Passed Conformance Test 7.5.1.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.5.1.1\n"); diff --git a/Tests/Conformance/C7.5.1.2.CC b/Tests/Conformance/C7.5.1.2.CC index 8e23920..cd1b181 100644 --- a/Tests/Conformance/C7.5.1.2.CC +++ b/Tests/Conformance/C7.5.1.2.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { signed char ch; int i; @@ -52,7 +52,7 @@ main () printf ("Passed Conformance Test 7.5.1.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.5.1.2\n"); diff --git a/Tests/Conformance/C7.5.1.3.CC b/Tests/Conformance/C7.5.1.3.CC index 8bfe273..70ebb31 100644 --- a/Tests/Conformance/C7.5.1.3.CC +++ b/Tests/Conformance/C7.5.1.3.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { signed char ch; int i; @@ -48,7 +48,7 @@ main () goto Fail; printf ("Passed Conformance Test 7.5.1.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.5.1.3\n"); diff --git a/Tests/Conformance/C7.5.1.4.CC b/Tests/Conformance/C7.5.1.4.CC index baf6b38..d9b33c0 100644 --- a/Tests/Conformance/C7.5.1.4.CC +++ b/Tests/Conformance/C7.5.1.4.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { signed char ch = 0x87; int i = -32767; @@ -45,7 +45,7 @@ main () printf ("Passed Conformance Test 7.5.1.4\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.5.1.4\n"); diff --git a/Tests/Conformance/C7.5.1.5.CC b/Tests/Conformance/C7.5.1.5.CC index dcebaa8..6ed4f77 100644 --- a/Tests/Conformance/C7.5.1.5.CC +++ b/Tests/Conformance/C7.5.1.5.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { char ch; short sh; @@ -80,7 +80,7 @@ main () printf ("Passed Conformance Test 7.5.1.5\n"); - return; + return 0; Fail: printf ("Passed Conformance Test 7.5.1.5\n"); diff --git a/Tests/Conformance/C7.5.1.6.CC b/Tests/Conformance/C7.5.1.6.CC index 0428177..979fb1e 100644 --- a/Tests/Conformance/C7.5.1.6.CC +++ b/Tests/Conformance/C7.5.1.6.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { char ch = 'D'; short sh = -32767; @@ -72,7 +72,7 @@ main () printf ("Passed Conformance Test 7.5.1.6\n"); - return; + return 0; Fail: printf ("Passed Conformance Test 7.5.1.6\n"); diff --git a/Tests/Conformance/C7.5.5.1.CC b/Tests/Conformance/C7.5.5.1.CC index 66c0c04..ac5830c 100644 --- a/Tests/Conformance/C7.5.5.1.CC +++ b/Tests/Conformance/C7.5.5.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char ch = 0x87; int i = -32767; @@ -33,7 +33,7 @@ main () printf ("Passed Conformance Test 7.5.5.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.5.5.1\n"); diff --git a/Tests/Conformance/C7.5.8.1.CC b/Tests/Conformance/C7.5.8.1.CC index 7624a25..eeb2b88 100644 --- a/Tests/Conformance/C7.5.8.1.CC +++ b/Tests/Conformance/C7.5.8.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i = 5; long L = 32777; @@ -26,7 +26,7 @@ main () printf ("Passed Conformance Test 7.5.8.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.5.8.1\n"); diff --git a/Tests/Conformance/C7.5.9.1.CC b/Tests/Conformance/C7.5.9.1.CC index 99e6b08..c2295e5 100644 --- a/Tests/Conformance/C7.5.9.1.CC +++ b/Tests/Conformance/C7.5.9.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i = 5; long L = 32777; @@ -27,7 +27,7 @@ main () printf ("Passed Conformance Test 7.5.9.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.5.9.1\n"); diff --git a/Tests/Conformance/C7.6.1.1.CC b/Tests/Conformance/C7.6.1.1.CC index af7d9cd..d412586 100644 --- a/Tests/Conformance/C7.6.1.1.CC +++ b/Tests/Conformance/C7.6.1.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i = 5; long L = 32777; @@ -37,7 +37,7 @@ main () printf ("Passed Conformance Test 7.6.1.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.6.1.1\n"); diff --git a/Tests/Conformance/C7.6.1.2.CC b/Tests/Conformance/C7.6.1.2.CC index 6698bb8..921eb3f 100644 --- a/Tests/Conformance/C7.6.1.2.CC +++ b/Tests/Conformance/C7.6.1.2.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { int i = 5; long L = 32777; @@ -35,7 +35,7 @@ main () printf ("Passed Conformance Test 7.6.1.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.6.1.2\n"); diff --git a/Tests/Conformance/C7.6.1.3.CC b/Tests/Conformance/C7.6.1.3.CC index aa69286..89d572a 100644 --- a/Tests/Conformance/C7.6.1.3.CC +++ b/Tests/Conformance/C7.6.1.3.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char ch = 87; int i = 32767; @@ -32,7 +32,7 @@ main () printf ("Passed Conformance Test 7.6.1.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.6.1.3\n"); diff --git a/Tests/Conformance/C7.6.2.1.CC b/Tests/Conformance/C7.6.2.1.CC index a1bdcff..dd2ce43 100644 --- a/Tests/Conformance/C7.6.2.1.CC +++ b/Tests/Conformance/C7.6.2.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i = 5; long L = 32777; @@ -55,7 +55,7 @@ main () printf ("Passed Conformance Test 7.6.2.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.6.2.1\n"); diff --git a/Tests/Conformance/C7.6.3.1.CC b/Tests/Conformance/C7.6.3.1.CC index a8ecee1..9674106 100644 --- a/Tests/Conformance/C7.6.3.1.CC +++ b/Tests/Conformance/C7.6.3.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { signed char ch = 0X57; int i = 0xabcd; @@ -49,7 +49,7 @@ main () goto Fail; printf ("Passed Conformance Test 7.6.3.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.6.3.1\n"); diff --git a/Tests/Conformance/C7.6.4.1.CC b/Tests/Conformance/C7.6.4.1.CC index 6cba7dc..c7543c8 100644 --- a/Tests/Conformance/C7.6.4.1.CC +++ b/Tests/Conformance/C7.6.4.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { int i [3] = { 5, 6, 7 }, *i1ptr = i, *i2ptr = &i [2]; int j, k, m, n; @@ -42,7 +42,7 @@ main () printf ("Passed Conformance Test 7.6.4.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.6.4.1\n"); diff --git a/Tests/Conformance/C7.6.6.1.CC b/Tests/Conformance/C7.6.6.1.CC index 0097dba..049a20c 100644 --- a/Tests/Conformance/C7.6.6.1.CC +++ b/Tests/Conformance/C7.6.6.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char ch = 0X57; int i = 0xabcd; @@ -33,7 +33,7 @@ main () printf ("Passed Conformance Test 7.6.6.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.6.6.1\n"); diff --git a/Tests/Conformance/C7.6.7.1.CC b/Tests/Conformance/C7.6.7.1.CC index 8dcbc70..0ceef5b 100644 --- a/Tests/Conformance/C7.6.7.1.CC +++ b/Tests/Conformance/C7.6.7.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char ch = 0X57; int i = 0xabcd; @@ -33,7 +33,7 @@ main () printf ("Passed Conformance Test 7.6.7.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.6.7.1\n"); diff --git a/Tests/Conformance/C7.6.8.1.CC b/Tests/Conformance/C7.6.8.1.CC index bdbcb76..9c3ce5b 100644 --- a/Tests/Conformance/C7.6.8.1.CC +++ b/Tests/Conformance/C7.6.8.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char ch = 0X57; int i = 0xabcd; @@ -33,7 +33,7 @@ main () printf ("Passed Conformance Test 7.6.8.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.6.8.1\n"); diff --git a/Tests/Conformance/C7.7.1.1.CC b/Tests/Conformance/C7.7.1.1.CC index 03e6f6b..b37f311 100644 --- a/Tests/Conformance/C7.7.1.1.CC +++ b/Tests/Conformance/C7.7.1.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i [3] = { 5, 6, 7 }, *i1ptr = i, *i2ptr = &i [2]; int j, k, m, n; @@ -43,7 +43,7 @@ main () printf ("Passed Conformance Test 7.7.1.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.7.1.1\n"); diff --git a/Tests/Conformance/C7.7.2.1.CC b/Tests/Conformance/C7.7.2.1.CC index afaaf9f..7c3e326 100644 --- a/Tests/Conformance/C7.7.2.1.CC +++ b/Tests/Conformance/C7.7.2.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i [3] = { 5, 6, 7 }, *i1ptr = i, *i2ptr = &i [2]; int j, k, m, n; @@ -43,7 +43,7 @@ main () printf ("Passed Conformance Test 7.7.2.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.7.2.1\n"); diff --git a/Tests/Conformance/C7.8.0.1.CC b/Tests/Conformance/C7.8.0.1.CC index f65b99c..c554b57 100644 --- a/Tests/Conformance/C7.8.0.1.CC +++ b/Tests/Conformance/C7.8.0.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i [3] = { 5, 6, 7 }, *i1ptr = i, *i2ptr = &i [2], *i3ptr; long L = 32777; @@ -41,7 +41,7 @@ main () printf ("Passed Conformance Test 7.8.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.8.0.1\n"); diff --git a/Tests/Conformance/C7.9.2.1.CC b/Tests/Conformance/C7.9.2.1.CC index 4cdd4ee..eb3cb70 100644 --- a/Tests/Conformance/C7.9.2.1.CC +++ b/Tests/Conformance/C7.9.2.1.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i = 5; long L = 32777; @@ -37,7 +37,7 @@ main () printf ("Passed Conformance Test 7.9.2.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.9.2.1\n"); diff --git a/Tests/Conformance/C7.9.2.2.CC b/Tests/Conformance/C7.9.2.2.CC index eb023bc..12361e7 100644 --- a/Tests/Conformance/C7.9.2.2.CC +++ b/Tests/Conformance/C7.9.2.2.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i = 5; long L = 32777; @@ -37,7 +37,7 @@ main () printf ("Passed Conformance Test 7.9.2.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.9.2.2\n"); diff --git a/Tests/Conformance/C7.9.2.3.CC b/Tests/Conformance/C7.9.2.3.CC index 970cfbe..79ddc01 100644 --- a/Tests/Conformance/C7.9.2.3.CC +++ b/Tests/Conformance/C7.9.2.3.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char ch = 87; int i = 32767; @@ -32,7 +32,7 @@ main () printf ("Passed Conformance Test 7.9.2.3\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.9.2.3\n"); diff --git a/Tests/Conformance/C7.9.2.4.CC b/Tests/Conformance/C7.9.2.4.CC index b23ad48..8a9ab4e 100644 --- a/Tests/Conformance/C7.9.2.4.CC +++ b/Tests/Conformance/C7.9.2.4.CC @@ -3,7 +3,7 @@ #include #include -main () +int main (void) { int i = 5; long L = 32777; @@ -56,7 +56,7 @@ main () printf ("Passed Conformance Test 7.9.2.4\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.9.2.4\n"); diff --git a/Tests/Conformance/C7.9.2.5.CC b/Tests/Conformance/C7.9.2.5.CC index aed4047..b82497c 100644 --- a/Tests/Conformance/C7.9.2.5.CC +++ b/Tests/Conformance/C7.9.2.5.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { signed char ch = 0X57; int i = 0xabcd; @@ -50,7 +50,7 @@ main () printf ("Passed Conformance Test 7.9.2.5\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.9.2.5\n"); diff --git a/Tests/Conformance/C7.9.2.6.CC b/Tests/Conformance/C7.9.2.6.CC index b6c0690..2a45f58 100644 --- a/Tests/Conformance/C7.9.2.6.CC +++ b/Tests/Conformance/C7.9.2.6.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char ch = 0X57; int i = 0xabcd; @@ -33,7 +33,7 @@ main () printf ("Passed Conformance Test 7.9.2.6\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.9.2.6\n"); diff --git a/Tests/Conformance/C7.9.2.7.CC b/Tests/Conformance/C7.9.2.7.CC index c7740e3..06a638e 100644 --- a/Tests/Conformance/C7.9.2.7.CC +++ b/Tests/Conformance/C7.9.2.7.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char ch = 0X57; int i = 0xabcd; @@ -33,7 +33,7 @@ main () printf ("Passed Conformance Test 7.9.2.7\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.9.2.7\n"); diff --git a/Tests/Conformance/C7.9.2.8.CC b/Tests/Conformance/C7.9.2.8.CC index 6677228..c24addc 100644 --- a/Tests/Conformance/C7.9.2.8.CC +++ b/Tests/Conformance/C7.9.2.8.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { char ch = 0X57; int i = 0xabcd; @@ -33,7 +33,7 @@ main () printf ("Passed Conformance Test 7.9.2.8\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 7.9.2.8\n"); diff --git a/Tests/Conformance/C7.9.2.9.CC b/Tests/Conformance/C7.9.2.9.CC index 4c59eaf..63bfd04 100644 --- a/Tests/Conformance/C7.9.2.9.CC +++ b/Tests/Conformance/C7.9.2.9.CC @@ -4,7 +4,7 @@ #include #include -main () +int main (void) { int i,j; diff --git a/Tests/Conformance/C8.7.0.1.CC b/Tests/Conformance/C8.7.0.1.CC index 70be07c..db820ac 100644 --- a/Tests/Conformance/C8.7.0.1.CC +++ b/Tests/Conformance/C8.7.0.1.CC @@ -19,7 +19,7 @@ int F1 (int i) /****************************************************************************/ -main () +int main (void) { char ch = 'd'; int i = 3; @@ -145,7 +145,7 @@ Out: } printf ("Passed Conformance Test 8.7.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 8.7.0.1\n"); diff --git a/Tests/Conformance/C8.7.0.2.CC b/Tests/Conformance/C8.7.0.2.CC index 89e4a18..e0ec58c 100644 --- a/Tests/Conformance/C8.7.0.2.CC +++ b/Tests/Conformance/C8.7.0.2.CC @@ -2,7 +2,7 @@ #include -void main(void) +int main(void) { int i, sum1 = 0, sum2 = 0; diff --git a/Tests/Conformance/C8.7.0.3.CC b/Tests/Conformance/C8.7.0.3.CC index c34ec38..d727d6f 100644 --- a/Tests/Conformance/C8.7.0.3.CC +++ b/Tests/Conformance/C8.7.0.3.CC @@ -3,7 +3,7 @@ #include -void main(void) +int main(void) { int i, sum1 = 0, sum2 = 0; diff --git a/Tests/Conformance/C8.7.0.4.CC b/Tests/Conformance/C8.7.0.4.CC index 267ae95..d6fc457 100644 --- a/Tests/Conformance/C8.7.0.4.CC +++ b/Tests/Conformance/C8.7.0.4.CC @@ -2,7 +2,7 @@ #include -void main(void) +int main(void) { enum color {red, orange, yellow, green, blue, violet} c; diff --git a/Tests/Conformance/C8.7.0.5.CC b/Tests/Conformance/C8.7.0.5.CC index 6334cdf..125eaab 100644 --- a/Tests/Conformance/C8.7.0.5.CC +++ b/Tests/Conformance/C8.7.0.5.CC @@ -2,7 +2,7 @@ #include -void main(void) +int main(void) { int i, hundreds = 0; diff --git a/Tests/Conformance/C8.7.0.6.CC b/Tests/Conformance/C8.7.0.6.CC index fe228da..0cb071c 100644 --- a/Tests/Conformance/C8.7.0.6.CC +++ b/Tests/Conformance/C8.7.0.6.CC @@ -3,7 +3,7 @@ #include -void main(void) +int main(void) { long l; diff --git a/Tests/Conformance/C8.8.0.1.CC b/Tests/Conformance/C8.8.0.1.CC index c93195e..6a0e0d0 100644 --- a/Tests/Conformance/C8.8.0.1.CC +++ b/Tests/Conformance/C8.8.0.1.CC @@ -3,7 +3,7 @@ #include #define youStillCan 1 -main () +int main (void) { int F1 (int i, int j); int i = 65, j = 7, k; @@ -85,7 +85,7 @@ main () printf ("Passed Conformance Test 8.8.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 8.8.0.1\n"); diff --git a/Tests/Conformance/C9.2.0.1.CC b/Tests/Conformance/C9.2.0.1.CC index d901e5a..a1f1906 100644 --- a/Tests/Conformance/C9.2.0.1.CC +++ b/Tests/Conformance/C9.2.0.1.CC @@ -10,7 +10,7 @@ return i+j; } -void main(void) +int main(void) { @@ -20,7 +20,7 @@ if (pasFunc(8,1) != 9) goto Fail; if (pasFunc(1,1) != 2) goto Fail; printf ("Passed Conformance Test 9.2.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 9.2.0.1\n"); diff --git a/Tests/Conformance/C9.3.0.1.CC b/Tests/Conformance/C9.3.0.1.CC index b0a2a6a..6253187 100644 --- a/Tests/Conformance/C9.3.0.1.CC +++ b/Tests/Conformance/C9.3.0.1.CC @@ -15,7 +15,7 @@ return iexp(x,y-1)*x; } -void main(void) +int main(void) { @@ -25,7 +25,7 @@ if (iexp(1,50) != 1) goto Fail; if (iexp(7,3) != 343) goto Fail; printf ("Passed Conformance Test 9.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 9.3.0.1\n"); diff --git a/Tests/Conformance/C9.5.0.1.CC b/Tests/Conformance/C9.5.0.1.CC index 9974b6a..d8907ce 100644 --- a/Tests/Conformance/C9.5.0.1.CC +++ b/Tests/Conformance/C9.5.0.1.CC @@ -2,6 +2,7 @@ #include #include +#include struct S { int i; float f; @@ -32,7 +33,7 @@ void Func1 (int i, char ch [], float f, struct S s, union U u) /****************************************************************************/ -main () +int main (void) { char string [4] = "hey"; struct S s = { 1, 2.0, 1, 2, 3, 4, 5 }; @@ -52,7 +53,7 @@ main () printf ("Passed Conformance Test 9.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 9.5.0.1\n"); diff --git a/Tests/Conformance/C9.5.0.2.CC b/Tests/Conformance/C9.5.0.2.CC index 1a6b6cd..eca8993 100644 --- a/Tests/Conformance/C9.5.0.2.CC +++ b/Tests/Conformance/C9.5.0.2.CC @@ -9,7 +9,7 @@ return x*2; } -void main(void) +int main(void) { int i,j; @@ -22,7 +22,7 @@ void main(void) if (j != 3) goto Fail; printf ("Passed Conformance Test 9.5.0.2\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 9.5.0.2\n"); diff --git a/Tests/Conformance/C9.7.0.1.CC b/Tests/Conformance/C9.7.0.1.CC index d650d16..7c9388e 100644 --- a/Tests/Conformance/C9.7.0.1.CC +++ b/Tests/Conformance/C9.7.0.1.CC @@ -24,7 +24,7 @@ void V1 (void) /**************************************************************************/ -main () +int main (void) { /* Func1 returns an enumeration E constant. */ @@ -97,7 +97,7 @@ main () printf ("Passed Conformance Test 9.7.0.1\n"); - return; + return 0; Fail: printf ("Failed Conformance Test 9.7.0.1\n"); diff --git a/Tests/Deviance/D2.1.0.1.CC b/Tests/Deviance/D2.1.0.1.CC index beeb894..5c7b306 100644 --- a/Tests/Deviance/D2.1.0.1.CC +++ b/Tests/Deviance/D2.1.0.1.CC @@ -1,6 +1,6 @@ /* Deviance Test 2.1.0.1: Ensure graphic characters $, @, ` can only appear */ /* in comments and character and string constants. */ -main () +int main (void) { int hey$, you@, look`; } diff --git a/Tests/Deviance/D2.2.0.2.CC b/Tests/Deviance/D2.2.0.2.CC index 4624534..e6e2e41 100644 --- a/Tests/Deviance/D2.2.0.2.CC +++ b/Tests/Deviance/D2.2.0.2.CC @@ -1,6 +1,9 @@ /* Deviance Test 2.2.0.2: Ensure comments without terminators are flagged */ /* as errors */ -main () + +int printf(const char *, ...); + +int main (void) { /* don't terminate this one diff --git a/Tests/Deviance/D2.4.0.1.CC b/Tests/Deviance/D2.4.0.1.CC index e4c7b50..de50306 100644 --- a/Tests/Deviance/D2.4.0.1.CC +++ b/Tests/Deviance/D2.4.0.1.CC @@ -1,5 +1,8 @@ /* Deviance Test 2.4.0.1: Ensure compound operators are scanned as one token */ -main () + +int printf(const char *, ...); + +int main (void) { struct a { int b; diff --git a/Tests/Deviance/D2.5.0.1.CC b/Tests/Deviance/D2.5.0.1.CC index bbbc694..8eafa55 100644 --- a/Tests/Deviance/D2.5.0.1.CC +++ b/Tests/Deviance/D2.5.0.1.CC @@ -1,5 +1,8 @@ /* Deviance Test 2.5.0.1: Ensure error flagging for invalid identifiers */ -main () + +int printf(const char *, ...); + +int main (void) { int 1n; char !v_9; diff --git a/Tests/Deviance/D2.5.0.2.CC b/Tests/Deviance/D2.5.0.2.CC index 7bde1de..6a2a271 100644 --- a/Tests/Deviance/D2.5.0.2.CC +++ b/Tests/Deviance/D2.5.0.2.CC @@ -1,5 +1,8 @@ /* Deviance Test 2.5.0.2: Ensure reserved words cannot be used as identifiers */ -main () + +int printf(const char *, ...); + +int main (void) { int auto; int break; diff --git a/Tests/Deviance/D2.7.1.1.CC b/Tests/Deviance/D2.7.1.1.CC index 5addfe3..d764b8c 100644 --- a/Tests/Deviance/D2.7.1.1.CC +++ b/Tests/Deviance/D2.7.1.1.CC @@ -1,5 +1,8 @@ /* Deviance Test 2.7.1.1: Ensure misformed integers are flagged as errors */ -main () + +int printf(const char *, ...); + +int main (void) { int a; diff --git a/Tests/Deviance/D2.7.1.2.CC b/Tests/Deviance/D2.7.1.2.CC index d33ba0b..59bcf1c 100644 --- a/Tests/Deviance/D2.7.1.2.CC +++ b/Tests/Deviance/D2.7.1.2.CC @@ -1,6 +1,9 @@ /* Deviance Test 2.7.1.2: Ensure long integer constant overflows are */ /* caught as errors */ -main () + +int printf(const char *, ...); + +int main (void) { long a; diff --git a/Tests/Deviance/D2.7.2.1.CC b/Tests/Deviance/D2.7.2.1.CC index cd96431..f3cd0c1 100644 --- a/Tests/Deviance/D2.7.2.1.CC +++ b/Tests/Deviance/D2.7.2.1.CC @@ -1,6 +1,9 @@ /* Deviance Test 2.7.2.1: Ensure misformed floating-point constants are */ /* flagged as errors */ -main () + +int printf(const char *, ...); + +int main (void) { float a; double b; diff --git a/Tests/Deviance/D2.7.3.1.CC b/Tests/Deviance/D2.7.3.1.CC index 95f8719..0383d30 100644 --- a/Tests/Deviance/D2.7.3.1.CC +++ b/Tests/Deviance/D2.7.3.1.CC @@ -1,6 +1,9 @@ /* Deviance Test 2.7.3.1: Ensure unterminated character constants are */ /* flagged as errors */ -main () + +int printf(const char *, ...); + +int main (void) { char a; int j; diff --git a/Tests/Deviance/D2.7.3.3.CC b/Tests/Deviance/D2.7.3.3.CC index a911d96..a50dc00 100644 --- a/Tests/Deviance/D2.7.3.3.CC +++ b/Tests/Deviance/D2.7.3.3.CC @@ -1,6 +1,9 @@ /* Deviance Test 2.7.3.3: Ensure character constants containing no */ /* characters are flagged as errors */ -main () + +int printf(const char *, ...); + +int main (void) { char a, b; diff --git a/Tests/Deviance/D2.7.4.1.CC b/Tests/Deviance/D2.7.4.1.CC index 552cc95..c784fce 100644 --- a/Tests/Deviance/D2.7.4.1.CC +++ b/Tests/Deviance/D2.7.4.1.CC @@ -1,7 +1,9 @@ /* Deviance Test 2.7.4.1: Ensure string constants with no closing " are */ /* flagged as errors */ -main () +int printf(const char *, ...); + +int main (void) { char string [] = "badly formed string ; diff --git a/Tests/Deviance/D2.7.4.4.CC b/Tests/Deviance/D2.7.4.4.CC index a6e08a0..934b725 100644 --- a/Tests/Deviance/D2.7.4.4.CC +++ b/Tests/Deviance/D2.7.4.4.CC @@ -1,8 +1,11 @@ -/* Deviance Test 2.7.3.5: Ensure functions cannot contain character string */ +/* Deviance Test 2.7.4.4: Ensure functions cannot contain character string */ /* constants whose total length exceeds 32760 bytes */ -main () + +int printf(const char *, ...); + +int main (void) { - printf ("Failed Deviance Test 2.7.3.5\n"); + printf ("Failed Deviance Test 2.7.4.4\n"); } int Dummy () @@ -541,5 +544,5 @@ abcdefghijklmnopqrstuvwxyz01234567890123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" abcdefghijklmnopqrstuvwxyz01234567890123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" "ab"; - return; + return 0; } diff --git a/Tests/Deviance/D25.0.1.CC b/Tests/Deviance/D25.0.1.CC index bcc4cc0..6013028 100644 --- a/Tests/Deviance/D25.0.1.CC +++ b/Tests/Deviance/D25.0.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { int i, j; diff --git a/Tests/Deviance/D25.0.2.CC b/Tests/Deviance/D25.0.2.CC index db41c41..f69073d 100644 --- a/Tests/Deviance/D25.0.2.CC +++ b/Tests/Deviance/D25.0.2.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { asm { diff --git a/Tests/Deviance/D3.3.1.1.CC b/Tests/Deviance/D3.3.1.1.CC index 967fdd2..9ee9da4 100644 --- a/Tests/Deviance/D3.3.1.1.CC +++ b/Tests/Deviance/D3.3.1.1.CC @@ -1,12 +1,14 @@ /* Deviance Test 3.3.1.1: Ensure invalid simple macro definitions are */ /* flagged as errors */ +int printf(const char *, ...); + #DEfine BadDef 10 #DEFINE anotherBaddef 20 #define 7*8 name goes first! #define /* oops -- no name A-tall!!! */ -main () +int main (void) { printf ("Failed Deviance Test 3.3.1.1\n"); } diff --git a/Tests/Deviance/D3.3.10.1.CC b/Tests/Deviance/D3.3.10.1.CC index 0127353..8142c56 100644 --- a/Tests/Deviance/D3.3.10.1.CC +++ b/Tests/Deviance/D3.3.10.1.CC @@ -1,5 +1,7 @@ /* Deviance Test 3.3.10.1: Ensure macro bodies contain only complete tokens */ +int printf(const char *, ...); + #define BadExp1 $ #define BadExp2 @~ #define BadChar1 'a @@ -7,7 +9,7 @@ #define BadString1 "not a complete string #define BadString2 nor is this" -main () +int main (void) { printf ("Failed Deviance Test 3.3.10.1\n"); } diff --git a/Tests/Deviance/D3.3.2.1.CC b/Tests/Deviance/D3.3.2.1.CC index dde82ca..19f64ce 100644 --- a/Tests/Deviance/D3.3.2.1.CC +++ b/Tests/Deviance/D3.3.2.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 3.3.2.1: Ensure invalid macro definitions/invocations */ /* are flagged as errors */ +int printf(const char *, ...); + #define sameName1(name1,name1) name1 * name1 #define missingRParen(x,y x / y #define sameName1(a,b) a | b @@ -10,7 +12,7 @@ #define oneGoodOne(z1,z2) z1 * z2 #define sameName2 " same name 2 " -main () +int main (void) { int a, b, c; diff --git a/Tests/Deviance/D3.3.3.1.CC b/Tests/Deviance/D3.3.3.1.CC index 759eafa..e1802e1 100644 --- a/Tests/Deviance/D3.3.3.1.CC +++ b/Tests/Deviance/D3.3.3.1.CC @@ -1,10 +1,12 @@ /* Deviance Test 3.3.3.1: Ensure macros which expand into preprocessor */ /* commands are not parsed as preprocessor cmds */ +int printf(const char *, ...); + #define includeFile #include #define badValue #define reallyBadValue 5 -main () +int main (void) { includeFile badValue diff --git a/Tests/Deviance/D3.3.4.1.CC b/Tests/Deviance/D3.3.4.1.CC index c01bf41..04a5609 100644 --- a/Tests/Deviance/D3.3.4.1.CC +++ b/Tests/Deviance/D3.3.4.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 3.3.4.1: Ensure cannot redefine or undefine ORCA/C's */ /* predefined macros */ +int printf(const char *, ...); + #define __LINE__ 5 #define __FILE__ "d3.3.4.1.cc" #define __DATE__ "Mar 01 1989" @@ -13,7 +15,7 @@ #undef __TIME__ #undef __STDC__ -main () +int main (void) { printf ("Failed Deviance Test 3.3.4.1\n"); } diff --git a/Tests/Deviance/D3.3.5.1.CC b/Tests/Deviance/D3.3.5.1.CC index 66a96d7..9c2c88a 100644 --- a/Tests/Deviance/D3.3.5.1.CC +++ b/Tests/Deviance/D3.3.5.1.CC @@ -1,5 +1,7 @@ /* Deviance Test 3.3.5.1: Check error generation for #undef commands */ +int printf(const char *, ...); + #undef Name #define Name "hey" /* macro replacement is NOT done */ /* for #undef commands */ @@ -10,7 +12,7 @@ #define cantUseIt 10 #undef cantUseIt -main () +int main (void) { char a[] = A; int i; diff --git a/Tests/Deviance/D3.4.0.1.CC b/Tests/Deviance/D3.4.0.1.CC index a7c4414..92f48ea 100644 --- a/Tests/Deviance/D3.4.0.1.CC +++ b/Tests/Deviance/D3.4.0.1.CC @@ -1,5 +1,7 @@ /* Deviance Test 3.4.0.1: Ensure errors flagged for invalid #include commands */ +int printf(const char *, ...); + #define BadMacro(x) #include "nosuchfile" -main () +int main (void) { printf ("Failed Deviance Test 3.4.0.1\n"); } diff --git a/Tests/Deviance/D3.5.1.1.CC b/Tests/Deviance/D3.5.1.1.CC index 542d228..1d94fca 100644 --- a/Tests/Deviance/D3.5.1.1.CC +++ b/Tests/Deviance/D3.5.1.1.CC @@ -1,5 +1,7 @@ /* Deviance Test 3.5.1.1: Check invalid #if, #else commands */ +int printf(const char *, ...); + #if /* #if with no operand */ #else #endif @@ -29,7 +31,7 @@ #endif /* missing endif */ -main () +int main (void) { printf ("Failed Deviance Test 3.5.1.1\n"); } diff --git a/Tests/Deviance/D3.5.2.1.CC b/Tests/Deviance/D3.5.2.1.CC index 896a5d8..4da5e9f 100644 --- a/Tests/Deviance/D3.5.2.1.CC +++ b/Tests/Deviance/D3.5.2.1.CC @@ -1,5 +1,7 @@ /* Deviance Test 3.5.2.1: Ensure illegal #elif commands are flagged as errors */ +int printf(const char *, ...); + #if 0 #define WHO_CARES 0 #elif 0 @@ -27,7 +29,7 @@ #elif /* no expression */ #endif -main () +int main (void) { printf ("Failed Deviance Test 3.5.2.1\n"); } diff --git a/Tests/Deviance/D3.5.3.1.CC b/Tests/Deviance/D3.5.3.1.CC index e3411eb..5f59949 100644 --- a/Tests/Deviance/D3.5.3.1.CC +++ b/Tests/Deviance/D3.5.3.1.CC @@ -1,7 +1,9 @@ /* Deviance Test 3.5.3.1: Ensure only macro names can be checked with the */ /* #ifdef and #ifndef commands */ -main () +int printf(const char *, ...); + +int main (void) { #ifdef a * 2 #endif diff --git a/Tests/Deviance/D3.5.5.1.CC b/Tests/Deviance/D3.5.5.1.CC index f9b3dd2..b66a51c 100644 --- a/Tests/Deviance/D3.5.5.1.CC +++ b/Tests/Deviance/D3.5.5.1.CC @@ -1,8 +1,10 @@ /* Deviance Test 3.5.5.1: Ensure invalid defined expressions are caught */ +int printf(const char *, ...); + #define NAME "hey, you!" -main () +int main (void) { if (defined NAME) /* defined can only appear in #if or #elif */ ; diff --git a/Tests/Deviance/D4.2.1.1.CC b/Tests/Deviance/D4.2.1.1.CC index c5eb127..74379d6 100644 --- a/Tests/Deviance/D4.2.1.1.CC +++ b/Tests/Deviance/D4.2.1.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 4.2.1.1: Ensure invalid scoping of identifiers is detected */ -main () +int printf(const char *, ...); + +int main (void) { int i; diff --git a/Tests/Deviance/D4.2.2.1.CC b/Tests/Deviance/D4.2.2.1.CC index 3ba7b50..a5d7f84 100644 --- a/Tests/Deviance/D4.2.2.1.CC +++ b/Tests/Deviance/D4.2.2.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 4.2.2.1: Ensure "hiding" identifiers with same scope is */ /* detected */ +int printf(const char *, ...); + #define MAC1 1 /* macro name */ #define MAC1 8 @@ -28,7 +30,7 @@ enum stillOthers { red, black, green, green }; double D2 (int x, int z); /* function names */ int D2 (char k); -main () +int main (void) { #define MAC2 2 /* macro name */ #define MAC2 3 diff --git a/Tests/Deviance/D4.2.3.1.CC b/Tests/Deviance/D4.2.3.1.CC index cd429ed..c0d59b7 100644 --- a/Tests/Deviance/D4.2.3.1.CC +++ b/Tests/Deviance/D4.2.3.1.CC @@ -1,6 +1,6 @@ /* Deviance Test 4.2.3.1: Ensure illegal forward references are detected */ -main () +int main (void) { int i; aPtr x; /* forward reference to user-defined type */ diff --git a/Tests/Deviance/D4.2.5.1.CC b/Tests/Deviance/D4.2.5.1.CC index 263fbc6..4e2afd0 100644 --- a/Tests/Deviance/D4.2.5.1.CC +++ b/Tests/Deviance/D4.2.5.1.CC @@ -2,6 +2,8 @@ /* identifiers in the same overloading class and */ /* sharing the same scope are detected */ +int printf(const char *, ...); + /* Errors at top level */ #define macro1 "hey" /* preprocessor macro names */ @@ -50,7 +52,7 @@ enum numbers { L, one, two }; /* Errors within a function */ -main () +int main (void) { #define macro99 99 /* preprocessor macro names */ #define macro99 999 diff --git a/Tests/Deviance/D4.2.9.1.CC b/Tests/Deviance/D4.2.9.1.CC index 367f2f0..c138363 100644 --- a/Tests/Deviance/D4.2.9.1.CC +++ b/Tests/Deviance/D4.2.9.1.CC @@ -1,9 +1,11 @@ /* Deviance Test 4.2.9.1: Ensure illegal scoping of extern variables is */ /* detected */ +int printf(const char *, ...); + double X; -main () +int main (void) { int i; diff --git a/Tests/Deviance/D4.3.0.1.CC b/Tests/Deviance/D4.3.0.1.CC index dbd013a..bd5ff97 100644 --- a/Tests/Deviance/D4.3.0.1.CC +++ b/Tests/Deviance/D4.3.0.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 4.3.0.1: Ensure illegal storage class specifications are */ /* detected */ +int printf(const char *, ...); + typedef double DblFunc (void); static int ReturnInt (long l); /* ReturnInt should be defined later in file */ @@ -8,7 +10,7 @@ static int ReturnInt (long l); /* ReturnInt should be defined later in file */ auto int s; /* auto can only be used in head of block */ register short f; /* register can only be used with local */ /* variables and function parameters */ -main () +int main (void) { int i; diff --git a/Tests/Deviance/D4.4.1.1.CC b/Tests/Deviance/D4.4.1.1.CC index fa1f168..cd38811 100644 --- a/Tests/Deviance/D4.4.1.1.CC +++ b/Tests/Deviance/D4.4.1.1.CC @@ -1,7 +1,9 @@ /* Deviance Test 4.4.1.1: Ensure declarations contain either a type specifier */ /* or storage class specifier or both */ -main () +int printf(const char *, ...); + +int main (void) { j; diff --git a/Tests/Deviance/D4.5.3.1.CC b/Tests/Deviance/D4.5.3.1.CC index 8a04cbf..e64c6c1 100644 --- a/Tests/Deviance/D4.5.3.1.CC +++ b/Tests/Deviance/D4.5.3.1.CC @@ -1,4 +1,6 @@ -/* Deviance Test 4.5.3.0.1: Ensure illegal array dimensions are detected */ +/* Deviance Test 4.5.3.1: Ensure illegal array dimensions are detected */ + +int printf(const char *, ...); static int x [0]; /* zero not allowed for dimension */ static float y [0] [5] [9]; @@ -25,7 +27,7 @@ long L1 (char ch1 [] []) /*****************************************************************************/ -main () +int main (void) { char ch0 [0], ch2 [9] [0], ch3 [8] [7] [0] [6]; extended ext [2] [0] [9] [0]; @@ -36,5 +38,5 @@ main () k = F1 (n [5] []); k = F1 (n); - printf ("Failed Deviance Test 4.5.3.0.1\n"); + printf ("Failed Deviance Test 4.5.3.1\n"); } diff --git a/Tests/Deviance/D4.6.0.1.CC b/Tests/Deviance/D4.6.0.1.CC index e787ff2..9ceb132 100644 --- a/Tests/Deviance/D4.6.0.1.CC +++ b/Tests/Deviance/D4.6.0.1.CC @@ -1,13 +1,15 @@ /* Deviance Test 4.6.0.1: Ensure attempt to initialize variables of type */ /* void and function is detected */ +int printf(const char *, ...); + static void v1 = 5; void v2 = 88; static int F1 (char ch) = 5; float F2 (double d3) = 5.6; -main () +int main (void) { printf ("Failed Deviance Test 4.6.0.1\n"); } diff --git a/Tests/Deviance/D4.6.0.2.CC b/Tests/Deviance/D4.6.0.2.CC index 9e3eade..66e3848 100644 --- a/Tests/Deviance/D4.6.0.2.CC +++ b/Tests/Deviance/D4.6.0.2.CC @@ -1,7 +1,9 @@ /* Deviance Test 4.6.0.2: Ensure attempt to initialize variables of type */ /* void and function is detected */ -main () +int printf(const char *, ...); + +int main (void) { void v3 = 99.0; register void v4 = 'a'; diff --git a/Tests/Deviance/D4.6.1.1.CC b/Tests/Deviance/D4.6.1.1.CC index 628ff46..651a6f2 100644 --- a/Tests/Deviance/D4.6.1.1.CC +++ b/Tests/Deviance/D4.6.1.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 4.6.1.1: Ensure non-constant initialization of static and */ /* extern variables is detected */ +int printf(const char *, ...); + static int i = 5; static int j = i + 2; static long L1 = &i - j; @@ -14,7 +16,7 @@ char ext3 = ch1 / ch1; unsigned int ext4 = ext3 || ext1; unsigned long ext5 = ul1; -main () +int main (void) { static int m1 = m1 - 0; static long m2 = ch1; diff --git a/Tests/Deviance/D4.6.2.1.CC b/Tests/Deviance/D4.6.2.1.CC index 6d7cfeb..952e78c 100644 --- a/Tests/Deviance/D4.6.2.1.CC +++ b/Tests/Deviance/D4.6.2.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 4.6.2.1: Ensure non-constant floating-point initializers */ /* for static and extern variables is detected */ +int printf(const char *, ...); + static float f0 = 1.0; static float f1 = f0 * 2.0; static double d1 = f0 + f1; @@ -10,7 +12,7 @@ float f2 = (float) e1; double d2 = f0--; extended e2 = f0 - f1; -main () +int main (void) { float f00 = 5.6 * f0; static float f3 = f00; diff --git a/Tests/Deviance/D4.6.3.1.CC b/Tests/Deviance/D4.6.3.1.CC index f1be800..30ae8a7 100644 --- a/Tests/Deviance/D4.6.3.1.CC +++ b/Tests/Deviance/D4.6.3.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 4.6.3.1: Ensure illegal pointer initializations are detected */ -main () +int printf(const char *, ...); + +int main (void) { int i2 [5], i1 = 5; diff --git a/Tests/Deviance/D4.6.4.1.CC b/Tests/Deviance/D4.6.4.1.CC index 6cc05e9..838eda1 100644 --- a/Tests/Deviance/D4.6.4.1.CC +++ b/Tests/Deviance/D4.6.4.1.CC @@ -1,5 +1,7 @@ /* Deviance Test 4.6.4.1: Ensure illegal array initializations are detected */ +int printf(const char *, ...); + static int i1 [3] = { 1, 2, 3, 4 }; /* too many elements */ static long L1 [4] = { 1, 2, 3, 4, 5, 5, 7 }; static double d1 [3] = { 1.0, 2.0, 3.0, 4.0 }; @@ -21,7 +23,7 @@ static struct S1 s2 [2] = { i3 [0], f2 }; unsigned int i4 [2] = { i3 [1], i2 }; unsigned long L2 [4] = { (unsigned long) f2 + 3 }; -main () +int main (void) { int i5 [7] = { 14, 15, 16, 17, 18, 19, 20, 21 }; /* too many elements */ float f5 [3] = { 1.1, 1.1, 1.1, 1.1, 4.4 }; diff --git a/Tests/Deviance/D4.6.5.1.CC b/Tests/Deviance/D4.6.5.1.CC index 5a360b1..e906a04 100644 --- a/Tests/Deviance/D4.6.5.1.CC +++ b/Tests/Deviance/D4.6.5.1.CC @@ -1,13 +1,15 @@ /* Deviance Test 4.6.5.1: Ensure illegal enumeration initializations are */ /* detected */ +int printf(const char *, ...); + static struct S { int i; float f; } s = { 2, 4.5 }; static char ch [] = "hey!"; static enum E1 { a, b, c } e1 = s; enum E2 { d, e, f } e2 = &ch; -main () +int main (void) { enum E3 { g, h } e3 = &s; register enum E4 { i, j, k } e4 = ch; diff --git a/Tests/Deviance/D4.6.6.1.CC b/Tests/Deviance/D4.6.6.1.CC index de28804..04b277b 100644 --- a/Tests/Deviance/D4.6.6.1.CC +++ b/Tests/Deviance/D4.6.6.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 4.6.6.1: Ensure illegal initialization of structures is */ /* detected */ +int printf(const char *, ...); + struct S1 { int i; float f; } s1 = { 3, 8.0, 'a' }; /* too many values */ @@ -9,7 +11,7 @@ struct S1 s2 = 2, 7.6; /* can't omit outer braces */ static struct S1 s3 = { 5, 5.0, 6.0, 77.77 }; /* too many values */ static struct S1 s4 = 0, 0.0; /* can't omit outer braces */ -main () +int main (void) { int i = 8; float f = 3.5; diff --git a/Tests/Deviance/D4.6.7.1.CC b/Tests/Deviance/D4.6.7.1.CC index af841ee..0066a4c 100644 --- a/Tests/Deviance/D4.6.7.1.CC +++ b/Tests/Deviance/D4.6.7.1.CC @@ -1,5 +1,7 @@ /* Deviance Test 4.6.7.1: Ensure illegal initialization of unions is detected */ +int printf(const char *, ...); + union U1 { int i; long L; char ch [5]; }; @@ -11,7 +13,7 @@ union U1 u3 = { 5, 6, "a", 2, 3 }; /* too many values */ static union U1 u4 = { 2, 4, 6.0 }; -main () +int main (void) { int i = 5; diff --git a/Tests/Deviance/D4.6.8.1.CC b/Tests/Deviance/D4.6.8.1.CC index 915bd16..1ea0ad8 100644 --- a/Tests/Deviance/D4.6.8.1.CC +++ b/Tests/Deviance/D4.6.8.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 4.6.8.1: Ensure improper dropping of initializer braces */ /* is detected */ +int printf(const char *, ...); + static int i1 [3] = 1, 2, 3; /* can't drop outer braces for arrays */ float f1 [2] = 3.1, 2.3; /* and structures */ @@ -10,7 +12,7 @@ struct S1 s2 = 'b', 4.4; struct S2 { comp c1 [3]; long L1 [2]; char ch; }; -main () +int main (void) { unsigned int ui1 [4] = 2, 3; /* can't drop outer braces for arrays */ struct S1 s3 = 'a', 3.3; /* and structures */ diff --git a/Tests/Deviance/D7.1.1.1.CC b/Tests/Deviance/D7.1.1.1.CC index e72cc20..69e67b9 100644 --- a/Tests/Deviance/D7.1.1.1.CC +++ b/Tests/Deviance/D7.1.1.1.CC @@ -1,6 +1,8 @@ /* Deviance Test 7.1.1.1: Ensure illegal use of non-lvalues is detected */ -main () +int printf(const char *, ...); + +int main (void) { int i [10]; /* names of arrays, functions, enum */ enum E {a, b, c}; /* constants, & void variables */ diff --git a/Tests/Deviance/D7.5.4.1.CC b/Tests/Deviance/D7.5.4.1.CC index 2a4e945..1c18631 100644 --- a/Tests/Deviance/D7.5.4.1.CC +++ b/Tests/Deviance/D7.5.4.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { float f = 1.1; /* can only apply ~ operator to integers */ double d = 2.2; diff --git a/Tests/Deviance/D7.6.1.1.CC b/Tests/Deviance/D7.6.1.1.CC index 6015d48..9583d73 100644 --- a/Tests/Deviance/D7.6.1.1.CC +++ b/Tests/Deviance/D7.6.1.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { float f = 1.1; /* can only apply % operator to integers */ double d = 2.2; diff --git a/Tests/Deviance/D7.6.3.1.CC b/Tests/Deviance/D7.6.3.1.CC index 1fdb144..7e49cba 100644 --- a/Tests/Deviance/D7.6.3.1.CC +++ b/Tests/Deviance/D7.6.3.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { float f = 1.1; /* can only apply >>, << operators to integers */ double d = 2.2; diff --git a/Tests/Deviance/D7.6.4.1.CC b/Tests/Deviance/D7.6.4.1.CC index 5f737ec..ad4ac4a 100644 --- a/Tests/Deviance/D7.6.4.1.CC +++ b/Tests/Deviance/D7.6.4.1.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { float f = 1.1, *fptr = &f; /* can only compare pointers with pointers */ char ch = 'a', *chptr = &ch; diff --git a/Tests/Deviance/D7.6.6.1.CC b/Tests/Deviance/D7.6.6.1.CC index aa162fd..110a161 100644 --- a/Tests/Deviance/D7.6.6.1.CC +++ b/Tests/Deviance/D7.6.6.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { float f = 1.1; /* can only apply & operator to integers */ double d = 2.2; diff --git a/Tests/Deviance/D7.6.7.1.CC b/Tests/Deviance/D7.6.7.1.CC index 6a3ad1a..14b776e 100644 --- a/Tests/Deviance/D7.6.7.1.CC +++ b/Tests/Deviance/D7.6.7.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { float f = 1.1; /* can only apply ^ operator to integers */ double d = 2.2; diff --git a/Tests/Deviance/D7.6.8.1.CC b/Tests/Deviance/D7.6.8.1.CC index 0727065..ad4a351 100644 --- a/Tests/Deviance/D7.6.8.1.CC +++ b/Tests/Deviance/D7.6.8.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { float f = 1.1; /* can only apply | operator to integers */ double d = 2.2; diff --git a/Tests/Deviance/D8.7.0.1.CC b/Tests/Deviance/D8.7.0.1.CC index 8f63bf2..dadf74d 100644 --- a/Tests/Deviance/D8.7.0.1.CC +++ b/Tests/Deviance/D8.7.0.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { int i = 3, j = 4; unsigned short s = 7; diff --git a/Tests/Deviance/D8.8.0.1.CC b/Tests/Deviance/D8.8.0.1.CC index d51c5c4..465534a 100644 --- a/Tests/Deviance/D8.8.0.1.CC +++ b/Tests/Deviance/D8.8.0.1.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { break; /* break outside of while, do, for, switch statement */ continue; /* continue outside of while, do, for statement */ diff --git a/Tests/Deviance/D9.2.0.1.CC b/Tests/Deviance/D9.2.0.1.CC index a7d2faf..b2e706b 100644 --- a/Tests/Deviance/D9.2.0.1.CC +++ b/Tests/Deviance/D9.2.0.1.CC @@ -22,7 +22,7 @@ void ( f (void) ) () /* f is a func returning a func returning void */ /*****************************************************************************/ -main () +int main (void) { printf ("Failed Deviance Test 9.2.0.1\n"); } diff --git a/Tests/Spec.Conform/SPC13.2.0.1.CC b/Tests/Spec.Conform/SPC13.2.0.1.CC index 0c8f915..5c76883 100644 --- a/Tests/Spec.Conform/SPC13.2.0.1.CC +++ b/Tests/Spec.Conform/SPC13.2.0.1.CC @@ -16,7 +16,7 @@ #include #include -main () +int main (void) { int i; char ch [] = "Error message is"; diff --git a/Tests/Spec.Conform/SPC13.4.0.1.CC b/Tests/Spec.Conform/SPC13.4.0.1.CC index f9081f0..f86e23d 100644 --- a/Tests/Spec.Conform/SPC13.4.0.1.CC +++ b/Tests/Spec.Conform/SPC13.4.0.1.CC @@ -8,11 +8,13 @@ #pragma optimize -1 #include +int printf(const char *, ...); + enum types { integer, character, singlePrecision, doublePrecision, extendedPrecision, endOfList }; -main () +int main (void) { int i = 2; char ch = 'c'; diff --git a/Tests/Spec.Conform/SPC17.16.0.1.CC b/Tests/Spec.Conform/SPC17.16.0.1.CC index 919f3c2..765474b 100644 --- a/Tests/Spec.Conform/SPC17.16.0.1.CC +++ b/Tests/Spec.Conform/SPC17.16.0.1.CC @@ -6,12 +6,13 @@ #include #include +#include struct S { int i; float f; char c; }; -main () +int main (void) { struct S s [3] = { 1, 1.0, 'a', 2, 2.0, 'b', 3, 3.0, 'c' }; struct S buff [3]; @@ -120,7 +121,7 @@ main () goto Fail2; printf ("Passed Special Conformance Test 17.16.0.1\n"); - return; + return 0; Fail: printf ("Failed Special Conformance Test 17.16.0.1\n"); diff --git a/Tests/Spec.Conform/SPC17.2.0.1.CC b/Tests/Spec.Conform/SPC17.2.0.1.CC index 056d3ad..e013523 100644 --- a/Tests/Spec.Conform/SPC17.2.0.1.CC +++ b/Tests/Spec.Conform/SPC17.2.0.1.CC @@ -8,7 +8,7 @@ #include -main () +int main (void) { int i, count = 0; @@ -153,12 +153,12 @@ main () goto Fail2; printf ("Passed Special Conformance Test 17.2.0.1 "); - return; + return 0; Fail: printf ("count = %d\n", count); perror ("File creation failure in Special Conformance Test 17.2.0.1 "); - return; + return 0; Fail2: printf ("count = %d\n", count); diff --git a/Tests/Spec.Conform/SPC17.2.0.2.CC b/Tests/Spec.Conform/SPC17.2.0.2.CC index f44472f..14177c5 100644 --- a/Tests/Spec.Conform/SPC17.2.0.2.CC +++ b/Tests/Spec.Conform/SPC17.2.0.2.CC @@ -11,7 +11,7 @@ #include -main () +int main (void) { int i, count = 0; @@ -228,7 +228,7 @@ main () goto Fail4; printf ("Passed Special Conformance Test 17.2.0.2 "); - return; + return 0; Fail: perror ("File open failure in Special Conformance Test 17.2.0.2 "); diff --git a/Tests/Spec.Conform/SPC17.2.0.3.CC b/Tests/Spec.Conform/SPC17.2.0.3.CC index d3996b8..265dcbf 100644 --- a/Tests/Spec.Conform/SPC17.2.0.3.CC +++ b/Tests/Spec.Conform/SPC17.2.0.3.CC @@ -31,7 +31,7 @@ #include #include -main () +int main (void) { int i, j; char s [255]; /* input buffer */ @@ -162,7 +162,7 @@ main () printf ("\n"); printf ("Passed Special Conformance Test 17.2.0.3 "); - return; + return 0; Fail: perror ("File open failure in Special Conformance Test 17.2.0.3 "); diff --git a/Tests/Spec.Conform/SPC17.3.0.1.CC b/Tests/Spec.Conform/SPC17.3.0.1.CC index 1c0bbaa..55e2160 100644 --- a/Tests/Spec.Conform/SPC17.3.0.1.CC +++ b/Tests/Spec.Conform/SPC17.3.0.1.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { FILE *f1; /* file pointer */ char buf [80]; /* buffer */ @@ -44,26 +44,26 @@ main () goto Fail4; printf ("Passed Special Conformance Test 17.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Special Conformance Test 17.3.0.1\n"); - return; + return 0; Fail1: printf ("Could not open tmp file for Special Conformance Test 17.3.0.1\n"); - return; + return 0; Fail2: printf ("Could not allocate buffer for Special Conformance Test 17.3.0.1\n"); - return; + return 0; Fail3: printf ("Could not write to file for Special Conformance Test 17.3.0.1\n"); - return; + return 0; Fail4: printf ("Could not close file for Special Conformance Test 17.3.0.1\n"); - return; + return 0; } diff --git a/Tests/Spec.Conform/SPC17.3.0.2.CC b/Tests/Spec.Conform/SPC17.3.0.2.CC index f524f9a..f5bdd14 100644 --- a/Tests/Spec.Conform/SPC17.3.0.2.CC +++ b/Tests/Spec.Conform/SPC17.3.0.2.CC @@ -8,7 +8,7 @@ #include #include -main () +int main (void) { FILE *f1; /* file pointer */ char buf [80]; /* buffer */ @@ -44,25 +44,25 @@ main () goto Fail4; printf ("Passed Special Conformance Test 17.3.0.2\n"); - return; + return 0; Fail: printf ("Failed Special Conformance Test 17.3.0.2\n"); - return; + return 0; Fail1: printf ("Could not open tmp file for Special Conformance Test 17.3.0.2\n"); - return; + return 0; Fail2: printf ("Could not allocate buffer for Special Conformance Test 17.3.0.2\n"); - return; + return 0; Fail3: printf ("Could not write to file for Special Conformance Test 17.3.0.2\n"); - return; + return 0; Fail4: printf ("Could not close file for Special Conformance Test 17.3.0.2\n"); - return; + return 0; } diff --git a/Tests/Spec.Conform/SPC17.3.0.3.CC b/Tests/Spec.Conform/SPC17.3.0.3.CC index 2f47943..1f3a373 100644 --- a/Tests/Spec.Conform/SPC17.3.0.3.CC +++ b/Tests/Spec.Conform/SPC17.3.0.3.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { FILE *f1; /* file pointer */ int i, j; @@ -30,22 +30,22 @@ main () goto Fail4; printf ("Passed Special Conformance Test 17.3.0.3\n"); - return; + return 0; Fail1: printf ("Could not open tmp file for Special Conformance Test 17.3.0.3\n"); - return; + return 0; Fail2: printf ("setvbuf command failed in Special Conformance Test 17.3.0.3\n"); - return; + return 0; Fail3: printf ("Could not write to file for Special Conformance Test 17.3.0.3\n"); - return; + return 0; Fail4: printf ("Could not close file for Special Conformance Test 17.3.0.3\n"); - return; + return 0; } diff --git a/Tests/Spec.Conform/SPC17.3.0.4.CC b/Tests/Spec.Conform/SPC17.3.0.4.CC index 4ad9ede..bac4f38 100644 --- a/Tests/Spec.Conform/SPC17.3.0.4.CC +++ b/Tests/Spec.Conform/SPC17.3.0.4.CC @@ -7,7 +7,7 @@ #include static char buf [BUFSIZ]; -main () +int main (void) { int count = 0; FILE *f1; /* file pointer */ @@ -51,22 +51,22 @@ main () goto Fail3; printf ("Passed Special Conformance Test 17.3.0.4\n"); - return; + return 0; Fail: printf ("Failed Special Conformance Test 17.3.0.4: count = %d\n", count); - return; + return 0; Fail1: printf ("Could not open tmp file for Special Conformance Test 17.3.0.4\n"); - return; + return 0; Fail2: printf ("Could not write to file for Special Conformance Test 17.3.0.4\n"); - return; + return 0; Fail3: printf ("Could not close file for Special Conformance Test 17.3.0.4\n"); - return; + return 0; } diff --git a/Tests/Spec.Conform/SPC17.3.0.5.CC b/Tests/Spec.Conform/SPC17.3.0.5.CC index 10866f2..fa3baa7 100644 --- a/Tests/Spec.Conform/SPC17.3.0.5.CC +++ b/Tests/Spec.Conform/SPC17.3.0.5.CC @@ -8,7 +8,7 @@ #include -main () +int main (void) { FILE *f1; /* file pointer */ int i, j; @@ -31,22 +31,22 @@ main () goto Fail3; printf ("Passed Special Conformance Test 17.3.0.5\n"); - return; + return 0; Fail: printf ("Failed Special Conformance Test 17.3.0.5\n"); - return; + return 0; Fail1: printf ("Could not open tmp file for Special Conformance Test 17.3.0.5\n"); - return; + return 0; Fail2: printf ("Could not write to file for Special Conformance Test 17.3.0.5\n"); - return; + return 0; Fail3: printf ("Could not close file for Special Conformance Test 17.3.0.5\n"); - return; + return 0; } diff --git a/Tests/Spec.Conform/SPC17.6.0.1.CC b/Tests/Spec.Conform/SPC17.6.0.1.CC index e99df1a..2713f72 100644 --- a/Tests/Spec.Conform/SPC17.6.0.1.CC +++ b/Tests/Spec.Conform/SPC17.6.0.1.CC @@ -19,7 +19,7 @@ #include #include -main () +int main (void) { int i, j; char s [255], ch; @@ -214,7 +214,7 @@ main () goto Fail5; printf ("\n"); - return; + return 0; Fail: perror ("File open failure in Special Conformance Test 17.6.0.1 "); diff --git a/Tests/Spec.Conform/SPC17.7.0.1.CC b/Tests/Spec.Conform/SPC17.7.0.1.CC index da2bfa6..3a9e4d5 100644 --- a/Tests/Spec.Conform/SPC17.7.0.1.CC +++ b/Tests/Spec.Conform/SPC17.7.0.1.CC @@ -6,7 +6,7 @@ #include -main () +int main (void) { int i; char string [20] = ""; /* initialize input string to null string */ diff --git a/Tests/Spec.Conform/SPC2.1.0.1.CC b/Tests/Spec.Conform/SPC2.1.0.1.CC index 5fc47d8..eaf0137 100644 --- a/Tests/Spec.Conform/SPC2.1.0.1.CC +++ b/Tests/Spec.Conform/SPC2.1.0.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { int c; diff --git a/Tests/Spec.Conform/SPC20.2.0.1.CC b/Tests/Spec.Conform/SPC20.2.0.1.CC index 4c8a555..36179ad 100644 --- a/Tests/Spec.Conform/SPC20.2.0.1.CC +++ b/Tests/Spec.Conform/SPC20.2.0.1.CC @@ -7,7 +7,9 @@ #include #include -main () +int printf(const char *, ...); + +int main (void) { time_t secondTime, theTime, *tptr = &theTime; char *timeString; @@ -72,7 +74,7 @@ main () if (d != 0.0) goto Fail; - return; + return 0; Fail: printf ("Call to a time function in spc20.2.0.1\n"); diff --git a/Tests/Spec.Conform/SPC21.1.0.1.CC b/Tests/Spec.Conform/SPC21.1.0.1.CC index 03b6568..340bdd5 100644 --- a/Tests/Spec.Conform/SPC21.1.0.1.CC +++ b/Tests/Spec.Conform/SPC21.1.0.1.CC @@ -6,7 +6,9 @@ #undef NDEBUG #include -main () +int printf(const char *, ...); + +int main (void) { assert (0); printf ("Failed Special Conformance Test 21.1.0.1\n"); diff --git a/Tests/Spec.Conform/SPC21.2.0.1.CC b/Tests/Spec.Conform/SPC21.2.0.1.CC index cdde5cd..4ad2bb4 100644 --- a/Tests/Spec.Conform/SPC21.2.0.1.CC +++ b/Tests/Spec.Conform/SPC21.2.0.1.CC @@ -7,7 +7,7 @@ #include -main () +int main (void) { int i; i = system ("catalog\r"); diff --git a/Tests/Spec.Conform/SPC21.3.0.1.CC b/Tests/Spec.Conform/SPC21.3.0.1.CC index 1a1b9ee..102b3c9 100644 --- a/Tests/Spec.Conform/SPC21.3.0.1.CC +++ b/Tests/Spec.Conform/SPC21.3.0.1.CC @@ -9,6 +9,8 @@ #include +int printf(const char *, ...); + /******************************************************************************/ void F1 () @@ -33,7 +35,7 @@ void F3 () /******************************************************************************/ -main () +int main (void) { int i; diff --git a/Tests/Spec.Conform/SPC21.3.0.2.CC b/Tests/Spec.Conform/SPC21.3.0.2.CC index a109941..0db9e95 100644 --- a/Tests/Spec.Conform/SPC21.3.0.2.CC +++ b/Tests/Spec.Conform/SPC21.3.0.2.CC @@ -8,6 +8,8 @@ #include +int printf(const char *, ...); + /******************************************************************************/ @@ -33,7 +35,7 @@ void F3 () /******************************************************************************/ -main () +int main (void) { int i; diff --git a/Tests/Spec.Conform/SPC21.3.0.3.CC b/Tests/Spec.Conform/SPC21.3.0.3.CC index 55c14e7..e944389 100644 --- a/Tests/Spec.Conform/SPC21.3.0.3.CC +++ b/Tests/Spec.Conform/SPC21.3.0.3.CC @@ -8,6 +8,8 @@ #include +int printf(const char *, ...); + /******************************************************************************/ @@ -33,7 +35,7 @@ void F3 () /******************************************************************************/ -main () +int main (void) { int i; diff --git a/Tests/Spec.Conform/SPC22.1.0.1.CC b/Tests/Spec.Conform/SPC22.1.0.1.CC index d8cd43f..7e79ff1 100644 --- a/Tests/Spec.Conform/SPC22.1.0.1.CC +++ b/Tests/Spec.Conform/SPC22.1.0.1.CC @@ -4,6 +4,10 @@ /* links, and executes test */ /* file with 3 parameters */ +#include + +int printf(const char *, ...); + int main (int argc, char *argv []) { int count = 0; diff --git a/Tests/Spec.Conform/SPC23.2.0.1.CC b/Tests/Spec.Conform/SPC23.2.0.1.CC index c328e91..9e426c3 100644 --- a/Tests/Spec.Conform/SPC23.2.0.1.CC +++ b/Tests/Spec.Conform/SPC23.2.0.1.CC @@ -5,8 +5,11 @@ /* file with parameters */ #include +#include -main () +int printf(const char *, ...); + +int main (void) { char *cmdLine; @@ -15,7 +18,7 @@ main () goto Fail; printf ("Passed Special Conformance Test 23.2.0.1\n"); - return; + return 0; Fail: printf ("Failed Special Conformance Test 23.2.0.1\n"); diff --git a/Tests/Spec.Conform/SPC25.0.1.CC b/Tests/Spec.Conform/SPC25.0.1.CC index 1d3b5cc..3614d8d 100644 --- a/Tests/Spec.Conform/SPC25.0.1.CC +++ b/Tests/Spec.Conform/SPC25.0.1.CC @@ -14,7 +14,7 @@ static int i1 = 33; -main () +int main (void) { int count = 0, i; char *chPtr; @@ -85,7 +85,7 @@ main () Out: printf ("Passed Conformance Test 25.0.1\n"); - return; + return 0; Fail: printf ("count = %d i = %d\n", count, i); diff --git a/Tests/Spec.Conform/SPC25.0.2.CC b/Tests/Spec.Conform/SPC25.0.2.CC index c92d1af..a3fd782 100644 --- a/Tests/Spec.Conform/SPC25.0.2.CC +++ b/Tests/Spec.Conform/SPC25.0.2.CC @@ -20,7 +20,7 @@ extern char * Init_Ch (void); extern int * Init_Int (int i []); -main () +int main (void) { char *chPtr; int *iPtr; @@ -64,7 +64,7 @@ main () Out: printf ("Passed Conformance Test 25.0.2\n"); - return; + return 0; Fail: printf ("count = %d\n", count); diff --git a/Tests/Spec.Conform/SPC3.3.4.1.CC b/Tests/Spec.Conform/SPC3.3.4.1.CC index e532220..6f4755c 100644 --- a/Tests/Spec.Conform/SPC3.3.4.1.CC +++ b/Tests/Spec.Conform/SPC3.3.4.1.CC @@ -6,7 +6,9 @@ /* verify that the __TIME__ macro return the computer's current clock time */ /* in the form: hh:mm:ss. */ -main () +int printf(const char *, ...); + +int main (void) { printf ("The current date is: '%s'\n", __DATE__); printf ("The current time is: '%s'\n", __TIME__); diff --git a/Tests/Spec.Conform/SPC3.4.0.1.CC b/Tests/Spec.Conform/SPC3.4.0.1.CC index c267403..85f1936 100644 --- a/Tests/Spec.Conform/SPC3.4.0.1.CC +++ b/Tests/Spec.Conform/SPC3.4.0.1.CC @@ -6,6 +6,8 @@ /* ufile1 */ /* userfile2 */ +int printf(const char *, ...); + #define libFile(x) #define userFile(x) x #include libFile(cfile1) diff --git a/Tests/Spec.Conform/SPC3.6.0.1.CC b/Tests/Spec.Conform/SPC3.6.0.1.CC index f3e6a68..65eeb00 100644 --- a/Tests/Spec.Conform/SPC3.6.0.1.CC +++ b/Tests/Spec.Conform/SPC3.6.0.1.CC @@ -9,7 +9,7 @@ void Sub (void) #line 9999 /* expect trace back to report error on line */ /* 9999+4 (call to Sub) */ -main () +int main (void) { Sub (); } diff --git a/Tests/Spec.Conform/SPC3.6.0.2.CC b/Tests/Spec.Conform/SPC3.6.0.2.CC index 7dc05f1..64457f0 100644 --- a/Tests/Spec.Conform/SPC3.6.0.2.CC +++ b/Tests/Spec.Conform/SPC3.6.0.2.CC @@ -12,12 +12,12 @@ void Sub (void) #line lineNum(88) "noFile" /* expect trace back to report error on line */ /* 91 (call to Sub), in file noFile */ -Sub2() +int Sub2 (void) { Sub(); } -main () +int main (void) { Sub2 (); } diff --git a/Tests/Spec.Conform/SPC3.6.0.3.CC b/Tests/Spec.Conform/SPC3.6.0.3.CC index 3d3e32f..fc73419 100644 --- a/Tests/Spec.Conform/SPC3.6.0.3.CC +++ b/Tests/Spec.Conform/SPC3.6.0.3.CC @@ -1,12 +1,16 @@ /* Special Conformance Test 3.6.0.3: Test explicit line numbering (#line) */ /* with filenames */ +#include + +int printf(const char *, ...); + #include #define FileName(x) x #define LINE_NUM 10 #line LINE_NUM FileName ("onemorefile") -main () +int main (void) { if (strcmp (__FILE__, "onemorefile")) { diff --git a/Tests/Spec.Conform/SPC34028 b/Tests/Spec.Conform/SPC34028 index 73c4b8f..4f5d4c2 100644 --- a/Tests/Spec.Conform/SPC34028 +++ b/Tests/Spec.Conform/SPC34028 @@ -1,6 +1,6 @@ /* Final include file for Special Conformance Test spc3.4.0.2.cc */ -main () +int main (void) { printf ("Passed Special Conformance Test 3.4.0.2\n"); } diff --git a/Tests/Spec.Conform/SPC4.3.0.1.CC b/Tests/Spec.Conform/SPC4.3.0.1.CC index 0bd0af5..2cfd70c 100644 --- a/Tests/Spec.Conform/SPC4.3.0.1.CC +++ b/Tests/Spec.Conform/SPC4.3.0.1.CC @@ -28,9 +28,12 @@ /*****************************************************************************/ #include +#include #include "spc4301.h" -main () +int printf(const char *, ...); + +int main (void) { int count = 0; diff --git a/Tests/Spec.Conform/SPC4.3.1.1.CC b/Tests/Spec.Conform/SPC4.3.1.1.CC index 8235f61..fea44bd 100644 --- a/Tests/Spec.Conform/SPC4.3.1.1.CC +++ b/Tests/Spec.Conform/SPC4.3.1.1.CC @@ -9,7 +9,9 @@ /* this test */ /* */ -main () +int printf(const char *, ...); + +int main (void) { int I1 (char ch); double D1 (float f); @@ -26,7 +28,7 @@ main () goto Fail; printf ("Passed Special Conformance Test 4.3.1.1\n"); - return; + return 0; Fail: printf ("Failed Special Conformance Test 4.3.1.1\n"); diff --git a/Tests/Spec.Conform/SPC4.4.1.1.CC b/Tests/Spec.Conform/SPC4.4.1.1.CC index 39a64eb..af26750 100644 --- a/Tests/Spec.Conform/SPC4.4.1.1.CC +++ b/Tests/Spec.Conform/SPC4.4.1.1.CC @@ -1,13 +1,15 @@ /* Special Conformance Test 4.4.1.1: Verification of ability to omit either */ /* type specifier or storage class in */ /* declarations, and both in function */ -/* definitions */ +/* definitions (C89/C90 only) */ /* */ /* Other files needed: spc4411.exec - separately compiles, links, and */ /* executes the files spc4.4.1.1.cc and */ /* spc4411.1.cc */ /* */ +int printf(const char *, ...); + static x; /* type of x is int */ float y; /* storage class of y is extern */ diff --git a/Tests/Spec.Conform/SPC4.5.2.1.CC b/Tests/Spec.Conform/SPC4.5.2.1.CC index 52db811..e8429aa 100644 --- a/Tests/Spec.Conform/SPC4.5.2.1.CC +++ b/Tests/Spec.Conform/SPC4.5.2.1.CC @@ -8,7 +8,7 @@ #include "spc4521.h" -main () +int main (void) { extern void F1 (void); F1 (); diff --git a/Tests/Spec.Conform/SPC4.5.3.1.CC b/Tests/Spec.Conform/SPC4.5.3.1.CC index 7e1c680..086e6a5 100644 --- a/Tests/Spec.Conform/SPC4.5.3.1.CC +++ b/Tests/Spec.Conform/SPC4.5.3.1.CC @@ -5,6 +5,8 @@ /* spc4531.1.cc - Extern function which tests the arrays */ /* spc4531.h - Header file declaring global arrays */ +int printf(const char *, ...); + int i1 [50], i3 [3] [5] [8]; /* all basic types */ long L1 [9], L2 [2] [6]; @@ -29,7 +31,7 @@ union longOrShort { int first; long second; }; union longOrShort u2 [3] [3], u1 [12]; -main () +int main (void) { extern int TestArray (void); diff --git a/Tests/Spec.Conform/SPC4.5.3.2.CC b/Tests/Spec.Conform/SPC4.5.3.2.CC index 3565e11..0a36025 100644 --- a/Tests/Spec.Conform/SPC4.5.3.2.CC +++ b/Tests/Spec.Conform/SPC4.5.3.2.CC @@ -8,6 +8,8 @@ /* spc4532.exec - EXEC file which separately compiles*/ /* links and executes test 4.5.3.0.2 */ +int printf(const char *, ...); + int *i1 [50]; /* all basic types */ long *L1 [9]; comp *c1 [3]; @@ -32,7 +34,7 @@ union longOrShort { int first; union longOrShort *u1 [12], U; -main () +int main (void) { extern int TestEm (void); diff --git a/Tests/Spec.Conform/SPC4.6.3.1.CC b/Tests/Spec.Conform/SPC4.6.3.1.CC index 1150239..89d8b23 100644 --- a/Tests/Spec.Conform/SPC4.6.3.1.CC +++ b/Tests/Spec.Conform/SPC4.6.3.1.CC @@ -8,6 +8,8 @@ #include +int printf(const char *, ...); + /* static and extern pointer variables can use only constant expressions */ struct S { int a; @@ -163,7 +165,7 @@ union U DispU (union U (*func) (void)) /*****************************************************************************/ -main () +int main (void) { extern int ExternTest (void); diff --git a/Tests/Spec.Conform/SPC4.6.3.2.CC b/Tests/Spec.Conform/SPC4.6.3.2.CC index 1f3bd67..344a50d 100644 --- a/Tests/Spec.Conform/SPC4.6.3.2.CC +++ b/Tests/Spec.Conform/SPC4.6.3.2.CC @@ -10,6 +10,8 @@ #include +int printf(const char *, ...); + /* static and extern pointer variables can use only constant expressions */ struct S { int a; @@ -82,7 +84,7 @@ struct S (*struct2Ptr) = S2; union U (*union2Ptr ) = U2; -main () +int main (void) { int count = 0; extern int ExternTest (void); @@ -140,7 +142,7 @@ main () goto Fail2; printf ("Passed Special Conformance Test 4.6.3.2\n"); - return; + return 0; Fail: printf ("count = %d\n", count); diff --git a/Tests/Spec.Conform/SPC4.6.3.3.CC b/Tests/Spec.Conform/SPC4.6.3.3.CC index beefaab..e73d97d 100644 --- a/Tests/Spec.Conform/SPC4.6.3.3.CC +++ b/Tests/Spec.Conform/SPC4.6.3.3.CC @@ -10,6 +10,8 @@ #include +int printf(const char *, ...); + /* static and extern pointer variables can use only constant expressions */ struct S { int a; @@ -82,7 +84,7 @@ struct S (*struct2Ptr) = &S2; union U (*union2Ptr ) = &U2; -main () +int main (void) { int count = 0; extern int ExternTest (void); @@ -135,7 +137,7 @@ main () goto Fail; printf ("Passed Special Conformance Test 4.6.3.3\n"); - return; + return 0; Fail: printf ("count = %d\n", count); diff --git a/Tests/Spec.Conform/SPC4.6.3.4.CC b/Tests/Spec.Conform/SPC4.6.3.4.CC index 0b73a65..94121c3 100644 --- a/Tests/Spec.Conform/SPC4.6.3.4.CC +++ b/Tests/Spec.Conform/SPC4.6.3.4.CC @@ -10,6 +10,8 @@ #include +int printf(const char *, ...); + /* static and extern pointer variables can use only constant expressions */ struct S { int a; @@ -82,7 +84,7 @@ struct S (*struct2Ptr) = &S2 [1]; union U (*union2Ptr ) = &U2 [1]; -main () +int main (void) { int count = 0; extern int ExternTest (void); diff --git a/Tests/Spec.Conform/SPC4.6.3.5.CC b/Tests/Spec.Conform/SPC4.6.3.5.CC index c8be93d..e81312d 100644 --- a/Tests/Spec.Conform/SPC4.6.3.5.CC +++ b/Tests/Spec.Conform/SPC4.6.3.5.CC @@ -5,7 +5,9 @@ /* the key echoed is the same key. */ /* */ -main () +int printf(const char *, ...); + +int main (void) { static char *keyBoard = (char *) 0xC000ul, *strobe = (char *) 0xC010ul, ch; @@ -15,7 +17,7 @@ main () *strobe = 1; ch = *keyBoard; printf ("The character typed is: %c\n", ch); - return; + return 0; Fail: printf ("Failed Special Conformance Test 4.6.3.5\n"); diff --git a/Tests/Spec.Conform/SPC4.6.3.6.CC b/Tests/Spec.Conform/SPC4.6.3.6.CC index a7fde24..aa3fd0a 100644 --- a/Tests/Spec.Conform/SPC4.6.3.6.CC +++ b/Tests/Spec.Conform/SPC4.6.3.6.CC @@ -10,6 +10,8 @@ #include +int printf(const char *, ...); + /* static and extern pointer variables can use only constant expressions */ struct S { int a; @@ -82,7 +84,7 @@ struct S (*struct2Ptr) = S2 + 1; union U (*union2Ptr ) = U2 + 1; -main () +int main (void) { int count = 0; extern int ExternTest (void); @@ -135,7 +137,7 @@ main () goto Fail2; printf ("Passed Special Conformance Test 4.6.3.6\n"); - return; + return 0; Fail: printf ("count = %d\n", count); diff --git a/Tests/Spec.Conform/SPC4311.EXEC b/Tests/Spec.Conform/SPC4311.EXEC index 80e801b..d171872 100644 --- a/Tests/Spec.Conform/SPC4311.EXEC +++ b/Tests/Spec.Conform/SPC4311.EXEC @@ -1,7 +1,6 @@ * Exec file to run Special Conformance Test 4.3.1.1 * unset exit -set echo on compile spc4.3.1.1.cc keep=3/spc4311.mn set errNo {status} diff --git a/Tests/Spec.Conform/SPC4521.1.CC b/Tests/Spec.Conform/SPC4521.1.CC index 47c6f01..6020dde 100644 --- a/Tests/Spec.Conform/SPC4521.1.CC +++ b/Tests/Spec.Conform/SPC4521.1.CC @@ -3,6 +3,8 @@ #include #include +int printf(const char *, ...); + /* Global data */ int *intPtr, i; /* pointers to all the basic types */ diff --git a/Tests/Spec.Conform/SPC4531.1.CC b/Tests/Spec.Conform/SPC4531.1.CC index 6233bfc..ca7f6bc 100644 --- a/Tests/Spec.Conform/SPC4531.1.CC +++ b/Tests/Spec.Conform/SPC4531.1.CC @@ -1,6 +1,8 @@ #include #include "spc4531.h" +int printf(const char *, ...); + /****************************************************************************/ int TestArray ( void ) diff --git a/Tests/Spec.Conform/SPC4532.1.CC b/Tests/Spec.Conform/SPC4532.1.CC index 47541c6..f6288f0 100644 --- a/Tests/Spec.Conform/SPC4532.1.CC +++ b/Tests/Spec.Conform/SPC4532.1.CC @@ -3,6 +3,8 @@ #include "spc4532.h" +int printf(const char *, ...); + int TestEm (void) { int count = 0; diff --git a/Tests/Spec.Conform/SPC4631.1.CC b/Tests/Spec.Conform/SPC4631.1.CC index adb08cd..0c9dd1c 100644 --- a/Tests/Spec.Conform/SPC4631.1.CC +++ b/Tests/Spec.Conform/SPC4631.1.CC @@ -3,6 +3,8 @@ #include +int printf(const char *, ...); + struct S { int a; float b; }; union U { int i; diff --git a/Tests/Spec.Conform/SPC4632.1.CC b/Tests/Spec.Conform/SPC4632.1.CC index 2af9373..b4bd541 100644 --- a/Tests/Spec.Conform/SPC4632.1.CC +++ b/Tests/Spec.Conform/SPC4632.1.CC @@ -4,6 +4,8 @@ #include +int printf(const char *, ...); + int ExternTest (void) { int count = 0; diff --git a/Tests/Spec.Conform/SPC4633.1.CC b/Tests/Spec.Conform/SPC4633.1.CC index cb70317..fddab6b 100644 --- a/Tests/Spec.Conform/SPC4633.1.CC +++ b/Tests/Spec.Conform/SPC4633.1.CC @@ -4,6 +4,8 @@ #include +int printf(const char *, ...); + int ExternTest (void) { int count = 0; diff --git a/Tests/Spec.Conform/SPC4634.1.CC b/Tests/Spec.Conform/SPC4634.1.CC index 8d45441..74d405c 100644 --- a/Tests/Spec.Conform/SPC4634.1.CC +++ b/Tests/Spec.Conform/SPC4634.1.CC @@ -4,6 +4,8 @@ #include +int printf(const char *, ...); + int ExternTest (void) { int count = 0; diff --git a/Tests/Spec.Conform/UFILE1 b/Tests/Spec.Conform/UFILE1 index 9853a4f..78b4104 100644 --- a/Tests/Spec.Conform/UFILE1 +++ b/Tests/Spec.Conform/UFILE1 @@ -1,3 +1,3 @@ -main () +int main (void) { int x; diff --git a/Tests/Spec.Deviance/SPD17.2.0.1.CC b/Tests/Spec.Deviance/SPD17.2.0.1.CC index d7e50cd..94f58dd 100644 --- a/Tests/Spec.Deviance/SPD17.2.0.1.CC +++ b/Tests/Spec.Deviance/SPD17.2.0.1.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { FILE *f1; @@ -12,7 +12,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.2.0.1\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.2.0.1\n"); diff --git a/Tests/Spec.Deviance/SPD17.2.0.2.CC b/Tests/Spec.Deviance/SPD17.2.0.2.CC index 1d0ce5f..e94a26d 100644 --- a/Tests/Spec.Deviance/SPD17.2.0.2.CC +++ b/Tests/Spec.Deviance/SPD17.2.0.2.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { FILE *f1; @@ -12,7 +12,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.2.0.2\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.2.0.2\n"); diff --git a/Tests/Spec.Deviance/SPD17.2.0.3.CC b/Tests/Spec.Deviance/SPD17.2.0.3.CC index 15fccda..a247c5b 100644 --- a/Tests/Spec.Deviance/SPD17.2.0.3.CC +++ b/Tests/Spec.Deviance/SPD17.2.0.3.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { FILE *f1; @@ -12,7 +12,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.2.0.3\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.2.0.3\n"); diff --git a/Tests/Spec.Deviance/SPD17.2.0.4.CC b/Tests/Spec.Deviance/SPD17.2.0.4.CC index cdbdae7..f881e50 100644 --- a/Tests/Spec.Deviance/SPD17.2.0.4.CC +++ b/Tests/Spec.Deviance/SPD17.2.0.4.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { FILE *f1; int i; @@ -13,7 +13,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.2.0.4\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.2.0.4\n"); diff --git a/Tests/Spec.Deviance/SPD17.2.0.5.CC b/Tests/Spec.Deviance/SPD17.2.0.5.CC index 3ba99cd..ef5193c 100644 --- a/Tests/Spec.Deviance/SPD17.2.0.5.CC +++ b/Tests/Spec.Deviance/SPD17.2.0.5.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { FILE *f1; int i; @@ -13,7 +13,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.2.0.5\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.2.0.5\n"); diff --git a/Tests/Spec.Deviance/SPD17.2.0.7.CC b/Tests/Spec.Deviance/SPD17.2.0.7.CC index fa0f6e0..9705e1b 100644 --- a/Tests/Spec.Deviance/SPD17.2.0.7.CC +++ b/Tests/Spec.Deviance/SPD17.2.0.7.CC @@ -3,7 +3,7 @@ #include -main () +int main (void) { FILE *f1; int i; @@ -13,7 +13,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.2.0.7\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.2.0.7\n"); diff --git a/Tests/Spec.Deviance/SPD17.3.0.1.CC b/Tests/Spec.Deviance/SPD17.3.0.1.CC index f4e2ac0..1a75e89 100644 --- a/Tests/Spec.Deviance/SPD17.3.0.1.CC +++ b/Tests/Spec.Deviance/SPD17.3.0.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; char buf [80]; @@ -13,9 +13,9 @@ main () goto Fail; printf ("Passed Deviance Test 17.3.0.1\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.3.0.1\n"); - return; + return 0; } diff --git a/Tests/Spec.Deviance/SPD17.3.0.2.CC b/Tests/Spec.Deviance/SPD17.3.0.2.CC index e12d722..477391e 100644 --- a/Tests/Spec.Deviance/SPD17.3.0.2.CC +++ b/Tests/Spec.Deviance/SPD17.3.0.2.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; char buf [80]; @@ -19,17 +19,17 @@ main () goto Fail; printf ("Passed Deviance Test 17.3.0.2\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.3.0.2\n"); - return; + return 0; Fail1: printf ("Unable to open work file for Deviance Test 17.3.0.2\n"); - return; + return 0; Fail2: printf ("Unable to write to file for Deviance Test 17.3.0.2\n"); - return; + return 0; } diff --git a/Tests/Spec.Deviance/SPD17.3.0.3.CC b/Tests/Spec.Deviance/SPD17.3.0.3.CC index c149424..86095da 100644 --- a/Tests/Spec.Deviance/SPD17.3.0.3.CC +++ b/Tests/Spec.Deviance/SPD17.3.0.3.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; char buf [80]; @@ -16,13 +16,13 @@ main () goto Fail; printf ("Passed Deviance Test 17.3.0.3\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.3.0.3\n"); - return; + return 0; Fail1: printf ("Unable to open work file for Deviance Test 17.3.0.3\n"); - return; + return 0; } diff --git a/Tests/Spec.Deviance/SPD17.5.0.1.CC b/Tests/Spec.Deviance/SPD17.5.0.1.CC index 9762de2..1eff0cf 100644 --- a/Tests/Spec.Deviance/SPD17.5.0.1.CC +++ b/Tests/Spec.Deviance/SPD17.5.0.1.CC @@ -4,7 +4,7 @@ #include #include -main () +int main (void) { FILE *f1; int i, j; @@ -20,7 +20,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.5.0.1\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.5.0.1\n"); diff --git a/Tests/Spec.Deviance/SPD17.5.0.2.CC b/Tests/Spec.Deviance/SPD17.5.0.2.CC index 1fa941f..a15303a 100644 --- a/Tests/Spec.Deviance/SPD17.5.0.2.CC +++ b/Tests/Spec.Deviance/SPD17.5.0.2.CC @@ -4,7 +4,7 @@ #include #include -main () +int main (void) { FILE *f1; long L1; @@ -15,9 +15,9 @@ main () goto Fail; printf ("Passed Deviance Test 17.5.0.2\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.5.0.2\n"); - return; + return 0; } diff --git a/Tests/Spec.Deviance/SPD17.6.0.1.CC b/Tests/Spec.Deviance/SPD17.6.0.1.CC index ab5042c..6e368a4 100644 --- a/Tests/Spec.Deviance/SPD17.6.0.1.CC +++ b/Tests/Spec.Deviance/SPD17.6.0.1.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; int i; @@ -14,7 +14,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.6.0.1\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.6.0.1\n"); diff --git a/Tests/Spec.Deviance/SPD17.6.0.2.CC b/Tests/Spec.Deviance/SPD17.6.0.2.CC index 2741f5d..b067e0b 100644 --- a/Tests/Spec.Deviance/SPD17.6.0.2.CC +++ b/Tests/Spec.Deviance/SPD17.6.0.2.CC @@ -2,7 +2,7 @@ #include -main () +int main (void) { FILE *f1; int i; @@ -14,7 +14,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.6.0.2\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.6.0.2\n"); diff --git a/Tests/Spec.Deviance/SPD17.6.0.3.CC b/Tests/Spec.Deviance/SPD17.6.0.3.CC index cc9c12e..80c9cae 100644 --- a/Tests/Spec.Deviance/SPD17.6.0.3.CC +++ b/Tests/Spec.Deviance/SPD17.6.0.3.CC @@ -5,7 +5,7 @@ FILE *f1; int i; -main () +int main (void) { i = ungetc ('a', f1); /* trying to read an unopened stream */ @@ -15,7 +15,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.6.0.3\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.6.0.3\n"); diff --git a/Tests/Spec.Deviance/SPD17.7.0.1.CC b/Tests/Spec.Deviance/SPD17.7.0.1.CC index 494b8c3..aeb917f 100644 --- a/Tests/Spec.Deviance/SPD17.7.0.1.CC +++ b/Tests/Spec.Deviance/SPD17.7.0.1.CC @@ -6,7 +6,7 @@ FILE *f1; char string [80], *s; int i; -main () +int main (void) { s = fgets (string, 90, f1); /* trying to read an unopened stream */ @@ -16,7 +16,7 @@ main () goto Fail; printf ("Passed Deviance Test 17.7.0.1\n"); - return; + return 0; Fail: printf ("Failed Deviance Test 17.7.0.1\n");