From fc4faa582a7831e9849dbd4e8d6b4b437535f791 Mon Sep 17 00:00:00 2001 From: Bob Andrews Date: Sun, 8 May 2022 18:46:12 +0200 Subject: [PATCH] Update Contributing.md --- Contributing.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Contributing.md b/Contributing.md index acaa396b1..9572dd6e0 100644 --- a/Contributing.md +++ b/Contributing.md @@ -2,6 +2,8 @@ This document contains all kinds of information that you should know if you want (''Note:'' The word "must" indicates a requirement. The word "should" indicates a recomendation.) +*this is work in progress and is constantly updated - if in doubt, please ask* + # generally * You must obey these rules when contributing new code or documentation to cc65. We are well aware that not all existing code may respect all rules outlined here - but this is no reason for you not to respect them. @@ -88,6 +90,21 @@ if (check()) { char* nextLine (FILE* f); +### Header files + +Headers that belong to the standard library (libc) must conform with the C standard. That means: +* all non standard functions, or functions that only exist in a certain standard, should be in #ifdefs + * the same is true for macros or typedefs +
+#if __CC65_STD__ == __CC65_STD_C99__
+/* stuff that only exists in C99 here */
+#endif
+#if __CC65_STD__ == __CC65_STD_CC65__
+/* non standard stuff here */
+#endif
+
+You can refer to Annex B of the ISO C99 standard ([here](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf) is the draft). + ## Assembly Sources * Op-code mnemonics must have lower-case letters. The names of instruction macroes may have upper-case letters. @@ -135,3 +152,10 @@ The only exception to the above are actions that are exclusive to the github act ## Wiki * The Wiki is strictly for additional information that does not fit into the regular user manual (LinuxDoc). The wiki must not duplicate any information that is present in the user manual + +# Roadmap / TODOs / open Ends + +## Test suite + +* specific tests to check the optimizer (rather than the codegenerator) are needed. +* we need more specific tests to check standard conformance of the library headers