scc, branch HEAD simple c99 compiler 9b162b0052316caaec77869017c395d0d050033e 2026-03-05T14:31:26Z 2026-03-05T14:31:26Z cc1: Accept integer comparations in enum variables Roberto E. Vargas Caballero k0ga@shike2.net commit 9b162b0052316caaec77869017c395d0d050033e parent 05c02ab56769cd7ff85630d501627941d6abe84f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 5 Mar 2026 15:31:26 +0100 cc1: Accept integer comparations in enum variables 05c02ab56769cd7ff85630d501627941d6abe84f 2026-02-20T14:04:53Z 2026-02-20T14:04:53Z tests: Update README Roberto E. Vargas Caballero k0ga@shike2.net commit 05c02ab56769cd7ff85630d501627941d6abe84f parent 494b5e954619ec4212db5a08c3f3b355b8104785 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 20 Feb 2026 15:04:53 +0100 tests: Update README 494b5e954619ec4212db5a08c3f3b355b8104785 2026-02-20T08:32:02Z 2026-02-20T08:36:24Z cc1: Fix va_start() warning Roberto E. Vargas Caballero k0ga@shike2.net commit 494b5e954619ec4212db5a08c3f3b355b8104785 parent 9ef71d0377a399f0e0c8e3bcfd47843fb5d66210 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 20 Feb 2026 09:32:02 +0100 cc1: Fix va_start() warning The va_start() builtin was checking if the parameter actually received was the actual last named parameter of a function with variable argument list, but it tried to get the ellipsis type from the list of arguments itself, but the list of arguments only has the named arguments, so it was not possible to match the ellipsis type. In order to check that it is required to go to the list of argument types of the function type. 9ef71d0377a399f0e0c8e3bcfd47843fb5d66210 2026-02-20T08:23:49Z 2026-02-20T08:23:49Z cc1: Mark builltin with side effect Roberto E. Vargas Caballero k0ga@shike2.net commit 9ef71d0377a399f0e0c8e3bcfd47843fb5d66210 parent 99a2aaeb775c3ba5d69e48b2501af71fce63e648 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 20 Feb 2026 09:23:49 +0100 cc1: Mark builltin with side effect The vaarg builtins are used to handle variable length argument and they do modify the va argument that they receive, so emiting warnings for them didn't make sense. 99a2aaeb775c3ba5d69e48b2501af71fce63e648 2026-02-18T20:01:47Z 2026-02-18T20:06:47Z build: Use LIBPREFIX for crt files in musl Roberto E. Vargas Caballero k0ga@shike2.net commit 99a2aaeb775c3ba5d69e48b2501af71fce63e648 parent 28c274e634e5bb1a8a99ee403f1373b6db7fcd07 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 18 Feb 2026 21:01:47 +0100 build: Use LIBPREFIX for crt files in musl In the case of musl there is a total disconnection between the prefix used by scc and the prefix used when building and installing musl. In order to make easier the configuration of musl this commits just insert the prefix obtained by the output of gcc. 28c274e634e5bb1a8a99ee403f1373b6db7fcd07 2026-02-18T18:45:06Z 2026-02-18T18:45:06Z cc1: Warn only in different macro redefinitions Roberto E. Vargas Caballero k0ga@shike2.net commit 28c274e634e5bb1a8a99ee403f1373b6db7fcd07 parent 40275b12f4b192d63d7d6702fd3caaa8eb3f5bc5 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 18 Feb 2026 19:45:06 +0100 cc1: Warn only in different macro redefinitions The standard says that redefining a macro with a different value is undefined behaviour. Scc uses to warn in any redefinition of macros, but as there are some projects that like to redefine them continously this generated too much noise, and this commit moved the warning to only when the defintion is different. 40275b12f4b192d63d7d6702fd3caaa8eb3f5bc5 2026-02-18T09:18:32Z 2026-02-18T09:18:32Z doc: Update scc man page to scc-cc Roberto E. Vargas Caballero k0ga@shike2.net commit 40275b12f4b192d63d7d6702fd3caaa8eb3f5bc5 parent 7c107f7208d33678855fb5ff8197d2a085cc4617 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 18 Feb 2026 10:18:32 +0100 doc: Update scc man page to scc-cc Scc is the wrapper tool now, and the name of the compiler binary is scc-cc. 7c107f7208d33678855fb5ff8197d2a085cc4617 2026-02-18T09:16:48Z 2026-02-18T09:18:21Z driver/posix: Improve command line compatibility Roberto E. Vargas Caballero k0ga@shike2.net commit 7c107f7208d33678855fb5ff8197d2a085cc4617 parent 42b50c811c8ad0f6db4fca6088bc67f33cce224e Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 18 Feb 2026 10:16:48 +0100 driver/posix: Improve command line compatibility Sadly, the world is out of any hope, and accepting to ignore flags used by some mainstream compilers help a lot. 42b50c811c8ad0f6db4fca6088bc67f33cce224e 2026-02-16T15:53:25Z 2026-02-16T15:56:26Z build: Use better config-musl target Roberto E. Vargas Caballero k0ga@shike2.net commit 42b50c811c8ad0f6db4fca6088bc67f33cce224e parent 5042ac1a04b0b0e797f20fb56d9e377870d513c7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 16 Feb 2026 16:53:25 +0100 build: Use better config-musl target The config-musl target was a helper to make easier to configure scc with a musl external libc, but it failed in native musl distributions like for example alpine. This new target is expected to be more robust and work in native and non native distributions. 5042ac1a04b0b0e797f20fb56d9e377870d513c7 2026-02-16T15:46:00Z 2026-02-16T15:46:00Z cc1: Add unary - folding for floats Roberto E. Vargas Caballero k0ga@shike2.net commit 5042ac1a04b0b0e797f20fb56d9e377870d513c7 parent 8b3404606cd8120322ef7816442a7fb938e7b513 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 16 Feb 2026 16:46:00 +0100 cc1: Add unary - folding for floats This is required for static initializers. 8b3404606cd8120322ef7816442a7fb938e7b513 2026-02-16T10:24:54Z 2026-02-16T10:24:54Z cc1: Mark cpp else blocks Roberto E. Vargas Caballero k0ga@shike2.net commit 8b3404606cd8120322ef7816442a7fb938e7b513 parent dd2b510053f9b9bfd2eb4f249d493b5f42c3c489 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 16 Feb 2026 11:24:54 +0100 cc1: Mark cpp else blocks Once we find a #else then no more #else or #elif can happen in the current preprocessor conditional context and we have to mark it to be able to detect this condition. dd2b510053f9b9bfd2eb4f249d493b5f42c3c489 2026-02-16T10:07:29Z 2026-02-16T10:07:29Z tests/cc: Use diff -u Roberto E. Vargas Caballero k0ga@shike2.net commit dd2b510053f9b9bfd2eb4f249d493b5f42c3c489 parent 3300cf3d3e2a83b6b6c438fd40b8a9a6b164900e Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 16 Feb 2026 11:07:29 +0100 tests/cc: Use diff -u Diff -u generates diff files easier to understand. 3300cf3d3e2a83b6b6c438fd40b8a9a6b164900e 2026-02-16T09:21:16Z 2026-02-16T09:21:16Z libc: Improve gcc-ssc Roberto E. Vargas Caballero k0ga@shike2.net commit 3300cf3d3e2a83b6b6c438fd40b8a9a6b164900e parent d1f3dc2a94c8cb46bb67259642a1059983de36be Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 16 Feb 2026 10:21:16 +0100 libc: Improve gcc-ssc The crt file should be the first object in the list, because it pulls the main symbol and maybe other required symbols. For many platforms it is not a big issue because the crt only uses the main symbol, but in some other cases it may pull other symbols. Also, forcing -g didn't make too much sense, and it was not difficult to handle it correctly. d1f3dc2a94c8cb46bb67259642a1059983de36be 2026-02-16T09:09:47Z 2026-02-16T09:13:27Z doc: Update LICENSE file Roberto E. Vargas Caballero k0ga@shike2.net commit d1f3dc2a94c8cb46bb67259642a1059983de36be parent 8b8b25fa24223ca929a77253d26c76b3c596ffd6 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 16 Feb 2026 10:09:47 +0100 doc: Update LICENSE file 8b8b25fa24223ca929a77253d26c76b3c596ffd6 2026-02-15T20:42:44Z 2026-02-16T09:13:09Z gcc-scc.sh: parse options using getopts Avi Halachmi (:avih) avihpit@yahoo.com commit 8b8b25fa24223ca929a77253d26c76b3c596ffd6 parent c31a24c04de5785a76725ea7e2fea652e192b107 Author: Avi Halachmi (:avih) <avihpit@yahoo.com> Date: Sun, 15 Feb 2026 22:42:44 +0200 gcc-scc.sh: parse options using getopts Previously, the options parsing code rejected some valid inputs, such as -ofile (in one arg). Now we use standarg getopts which conforms to the POSIX syntax guidelines. Additionally, improve the error message on unknown option: - print to stderr instead of stdout. - quote it (otherwise these are globs...). - Add spaces between the options (still less than 70 chars). c31a24c04de5785a76725ea7e2fea652e192b107 2026-02-15T20:22:19Z 2026-02-16T08:45:58Z scc-cpp.sh and gcc-scc.sh: improve handling of arguments Avi Halachmi (:avih) avihpit@yahoo.com commit c31a24c04de5785a76725ea7e2fea652e192b107 parent 534a9fa01a8a0c080df60800a370421dc594532c Author: Avi Halachmi (:avih) <avihpit@yahoo.com> Date: Sun, 15 Feb 2026 22:22:19 +0200 scc-cpp.sh and gcc-scc.sh: improve handling of arguments Previously, any argument to scc-cpp.sh and some arguments to gcc-scc.sh were broken if they contained any IFS chars, such as space. Now correct quoting is used in these scripts, which do maintain the arguments correctly. In scc-cpp.sh the change is trivial from $@ to "$@" . In gcc-scc.sh it's a bit more involved as arguments are handled individually and iteratively. The big change is replacing .c with .o for all file names for $ld, where instead of converting the whole line in one sed, we now iterate the files individually while maintaining any IFS chars in them 534a9fa01a8a0c080df60800a370421dc594532c 2026-02-15T10:12:28Z 2026-02-15T10:16:56Z make: Escape values passed in MAKEFLAGS Roberto E. Vargas Caballero k0ga@shike2.net commit 534a9fa01a8a0c080df60800a370421dc594532c parent d94c6547755e253374bb6da489b5c01f69680dbc Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 15 Feb 2026 11:12:28 +0100 make: Escape values passed in MAKEFLAGS The POSIX standard says: The macro= value macro definition operands can also be included. The difference between the contents of MAKEFLAGS and the make utility command line is that the contents of the variable shall not be subjected to the word expansions (see Word Expansions) associated with parsing the command line values. And it basically means that we have to escape the parameters passed in MAKEFLAGS and then unescape and doing the word spliting. The code had a naive strtok() implementation for word spliting, and it had to be replaced for a more complex parsing function which also handles escapes and quotes with ' and ". d94c6547755e253374bb6da489b5c01f69680dbc 2026-02-15T10:07:41Z 2026-02-15T10:07:41Z posix: Quote parameters passed down in scc Roberto E. Vargas Caballero k0ga@shike2.net commit d94c6547755e253374bb6da489b5c01f69680dbc parent ffc56872a365f518ba8899157a2738a5462df500 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 15 Feb 2026 11:07:41 +0100 posix: Quote parameters passed down in scc The scc wrapper has to preserve the parameters in the best possible way to avoid spliting words in the wrong places when they are passed down to the specific tools. ffc56872a365f518ba8899157a2738a5462df500 2026-02-12T11:46:45Z 2026-02-12T11:46:45Z cc2: Add missed dependencies for riscv Roberto E. Vargas Caballero k0ga@shike2.net commit ffc56872a365f518ba8899157a2738a5462df500 parent 0dc121edaac1b54277f2eac7c3fac45746326ff2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 12 Feb 2026 12:46:45 +0100 cc2: Add missed dependencies for riscv 0dc121edaac1b54277f2eac7c3fac45746326ff2 2026-02-11T13:44:44Z 2026-02-11T13:44:44Z tests/make: Fix mistakes after trap changes Roberto E. Vargas Caballero k0ga@shike2.net commit 0dc121edaac1b54277f2eac7c3fac45746326ff2 parent 5eedaa9f030481f63ab828c89c0623068fd2b7a7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 11 Feb 2026 14:44:44 +0100 tests/make: Fix mistakes after trap changes 5eedaa9f030481f63ab828c89c0623068fd2b7a7 2026-02-11T13:38:41Z 2026-02-11T13:38:41Z make: Change default CFLAGS and FFLAGS Roberto E. Vargas Caballero k0ga@shike2.net commit 5eedaa9f030481f63ab828c89c0623068fd2b7a7 parent 3ef4da68f555260111abb67615a28885bf57a7b5 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 11 Feb 2026 14:38:41 +0100 make: Change default CFLAGS and FFLAGS This is a very weird situation, because classical cc accepted -O to enable optimizations, but POSIX 2004 specified -O level for c99, but it specified -O for default value of CFLAGS in make. This conjuction made that gcc accepts -O1 but not -O 1, because -O 1 is interpreted like the -O option and the source file 1. That makes that the default CFLAGS of POSIX make cannot work with gcc (and clang), but GNU make uses -O1 instead of the -O 1 specified in POSIX. Seems both values should be accepted by compliant POSIX tools, in order to avoid problems the best option is to follow GNU make here and use -O1 instead of -O 1, even when it is not strictly POSIX compliant. 3ef4da68f555260111abb67615a28885bf57a7b5 2026-02-10T13:38:36Z 2026-02-11T08:23:19Z cc2: Generalize keeplabel() Roberto E. Vargas Caballero k0ga@shike2.net commit 3ef4da68f555260111abb67615a28885bf57a7b5 parent 61adffcdcf6e9aeb0c762fb0ba3974d6c2e648c4 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 10 Feb 2026 14:38:36 +0100 cc2: Generalize keeplabel() Having a keeplabel() call in every case where we can modify the statement with the current label is very fragile, and we should to search for a more general solution where we don't have to care anymore about this problem. We could modify the parser to get rid of labels in statements and have only label statements, but it is much more simple to check for that case in every call to sethi(). 61adffcdcf6e9aeb0c762fb0ba3974d6c2e648c4 2026-02-10T10:26:43Z 2026-02-10T12:06:30Z cc2: Keep label position in branches Roberto E. Vargas Caballero k0ga@shike2.net commit 61adffcdcf6e9aeb0c762fb0ba3974d6c2e648c4 parent 91d6c4c2e9cf507de205fab129a65be40fb1c6b3 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 10 Feb 2026 11:26:43 +0100 cc2: Keep label position in branches When a branch is transformed into a set of jumps new statements are inserted before the current statement, displacing the relative position of the label of the current statement in case of having one. For that reason in this case we have to create a label statment and place there the label. 91d6c4c2e9cf507de205fab129a65be40fb1c6b3 2026-02-10T10:26:43Z 2026-02-10T11:33:06Z cc2: Keep label position in commas Roberto E. Vargas Caballero k0ga@shike2.net commit 91d6c4c2e9cf507de205fab129a65be40fb1c6b3 parent 9e85b6a1ad15b70aefd3436ca605aea2f523f335 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 10 Feb 2026 11:26:43 +0100 cc2: Keep label position in commas When a comma is transformed into a set of jumps new statements are inserted before the current statement, displacing the relative position of the label of the current statement in case of having one. For that reason in this case we have to create a label statment and place there the label. 9e85b6a1ad15b70aefd3436ca605aea2f523f335 2026-02-10T10:26:43Z 2026-02-10T11:33:06Z cc2: Keep label position in logic expressions Roberto E. Vargas Caballero k0ga@shike2.net commit 9e85b6a1ad15b70aefd3436ca605aea2f523f335 parent 8be6d9e4cd588fd6110a4252e36848214ad04b28 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 10 Feb 2026 11:26:43 +0100 cc2: Keep label position in logic expressions When a logic is transformed into a set of jumps new statements are inserted before the current statement, displacing the relative position of the label of the current statement in case of having one. For that reason in this case we have to create a label statment and place there the label. 8be6d9e4cd588fd6110a4252e36848214ad04b28 2026-02-10T10:26:43Z 2026-02-10T11:33:06Z cc2: Keep label position in ternaries Roberto E. Vargas Caballero k0ga@shike2.net commit 8be6d9e4cd588fd6110a4252e36848214ad04b28 parent f3c4d6c3e0822ccf373935eb8851660bbd298931 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 10 Feb 2026 11:26:43 +0100 cc2: Keep label position in ternaries When a ternary is transformed into a set of jumps new statements are inserted before the current statement, displacing the relative position of the label of the current statement in case of having one. For that reason in this case we have to create a label statment and place there the label. f3c4d6c3e0822ccf373935eb8851660bbd298931 2026-02-10T10:00:03Z 2026-02-10T11:33:01Z cc2: Preserve labels in replace() Roberto E. Vargas Caballero k0ga@shike2.net commit f3c4d6c3e0822ccf373935eb8851660bbd298931 parent 46588de4ca1b0a4c47591d61c5947dc1a3238ce5 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 10 Feb 2026 11:00:03 +0100 cc2: Preserve labels in replace() The intention of replace is replacing a node with other, but in case the original node had a label it was lost in the replace process. 46588de4ca1b0a4c47591d61c5947dc1a3238ce5 2026-02-09T15:08:49Z 2026-02-09T15:11:07Z cc1: Add support for non constant auto initializers Roberto E. Vargas Caballero k0ga@shike2.net commit 46588de4ca1b0a4c47591d61c5947dc1a3238ce5 parent 34b628de0fe4f297e8e5ef969a6355748a8154ef Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 9 Feb 2026 16:08:49 +0100 cc1: Add support for non constant auto initializers This has been an important miss in scc for a while. While this code is not guranteed to work for all the cases, and it can generate really bad code, it works for the most common casesa and it can be used to bootstrap them. 34b628de0fe4f297e8e5ef969a6355748a8154ef 2026-02-04T11:41:41Z 2026-02-09T12:42:30Z cc1: Disable string emit in initializers Roberto E. Vargas Caballero k0ga@shike2.net commit 34b628de0fe4f297e8e5ef969a6355748a8154ef parent c74e72c72af0f7ce01fe1388f4d542a57c5ed70f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Feb 2026 12:41:41 +0100 cc1: Disable string emit in initializers When we are dealing with initializers there are transformations done to the original strings to fit with the target type, like adding additional 0 or removing characters if it is bigger. That meant that we were emitting strings that were not actually used, because the initializers were emitting their own copy of these strings. In case of having an error in initialize() the disstring variable would remain set, but that is not a problem because in that state we don't emit anything else. Also, the function str2ary() had a bug hidden in how the new string was generated, but due to other bug that string was not used ever. The new code avoids using str* alike functions because it would break when the array has embedded NUL characters. c74e72c72af0f7ce01fe1388f4d542a57c5ed70f 2026-02-02T11:43:35Z 2026-02-02T11:46:46Z tests/cc: Add 0239-fcasts.c Roberto E. Vargas Caballero k0ga@shike2.net commit c74e72c72af0f7ce01fe1388f4d542a57c5ed70f parent cdd599b1db41f2983c446c0fdefb799afbb511eb Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 2 Feb 2026 12:43:35 +0100 tests/cc: Add 0239-fcasts.c cdd599b1db41f2983c446c0fdefb799afbb511eb 2026-02-02T11:37:24Z 2026-02-02T11:37:24Z cc1: Fix padding in initializers Roberto E. Vargas Caballero k0ga@shike2.net commit cdd599b1db41f2983c446c0fdefb799afbb511eb parent 42441dfa818cce4c67092948f8113fd1afef41ab Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 2 Feb 2026 12:37:24 +0100 cc1: Fix padding in initializers The alignment calculation was wrong and it generated static struct and arrays with data misplaced. 42441dfa818cce4c67092948f8113fd1afef41ab 2026-01-31T19:36:23Z 2026-01-31T19:36:23Z objdump: Minor typo in error string Roberto E. Vargas Caballero k0ga@shike2.net commit 42441dfa818cce4c67092948f8113fd1afef41ab parent 8287e1aeccdcf88a7ac6d415ca162ccb474da3af Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 31 Jan 2026 20:36:23 +0100 objdump: Minor typo in error string 8287e1aeccdcf88a7ac6d415ca162ccb474da3af 2026-01-31T18:53:02Z 2026-01-31T18:53:02Z cc2/qbe: Fix floating point conversions Roberto E. Vargas Caballero k0ga@shike2.net commit 8287e1aeccdcf88a7ac6d415ca162ccb474da3af parent 0f0d3edeb1988957d0196482eec84366956cb574 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 31 Jan 2026 19:53:02 +0100 cc2/qbe: Fix floating point conversions The operations were inverted and it tried to truncate when it had to extend, and it tried to extend when it had to truncate. 0f0d3edeb1988957d0196482eec84366956cb574 2026-01-31T18:05:39Z 2026-01-31T18:05:39Z cc1: Fold constant casts involving floats Roberto E. Vargas Caballero k0ga@shike2.net commit 0f0d3edeb1988957d0196482eec84366956cb574 parent 3b5e9eb7079be6f946a66c2b751921723680a5aa Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 31 Jan 2026 19:05:39 +0100 cc1: Fold constant casts involving floats 3b5e9eb7079be6f946a66c2b751921723680a5aa 2026-01-31T08:50:03Z 2026-01-31T08:55:12Z cc2/qbe: Fix bug introduced in b83ec8ed Roberto E. Vargas Caballero k0ga@shike2.net commit 3b5e9eb7079be6f946a66c2b751921723680a5aa parent eaf2b18533e87462e71e588fd6edd96d937622b2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 31 Jan 2026 09:50:03 +0100 cc2/qbe: Fix bug introduced in b83ec8ed The commit b83ec8ed modified the code of binary operations because in the case of comparisions we have a cmp node with float type, but the result is integer. The intermediate language used cannot express cases like this one, because it assumes that the operand and the result have the same type. The commit b83ec8ed assumes that the piece of code modified applied only to comparisions, but in fact, it affected to any binary operation, producing that all the binary operations were casted to int32type. eaf2b18533e87462e71e588fd6edd96d937622b2 2026-01-30T20:50:42Z 2026-01-30T20:50:42Z cc1: Fix definition of __FLT_EVAL_METHOD__ Roberto E. Vargas Caballero k0ga@shike2.net commit eaf2b18533e87462e71e588fd6edd96d937622b2 parent b83ec8ed7ab5e20a968b8e1a00236036ea363131 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 30 Jan 2026 21:50:42 +0100 cc1: Fix definition of __FLT_EVAL_METHOD__ b83ec8ed7ab5e20a968b8e1a00236036ea363131 2026-01-30T20:37:48Z 2026-01-30T20:37:48Z cc1: Use type punning to pass floats to cc2 Roberto E. Vargas Caballero k0ga@shike2.net commit b83ec8ed7ab5e20a968b8e1a00236036ea363131 parent f41102032108467135842e9f36c4dfd1072c4d62 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 30 Jan 2026 21:37:48 +0100 cc1: Use type punning to pass floats to cc2 Doesn't mind what we do that we cannot pass a floating point number from cc1 to cc2 in a fully portable way, and using type punning at least maintain the endianess correctly. This code should even work in cross compilation as far as the host and the target use the same floating point representation, that today will likely be the ieee 754. f41102032108467135842e9f36c4dfd1072c4d62 2026-01-30T16:06:37Z 2026-01-30T16:06:37Z cc1: Fix pointer cast type Roberto E. Vargas Caballero k0ga@shike2.net commit f41102032108467135842e9f36c4dfd1072c4d62 parent 475fa03250d04142fb1aeb9635ffe7e3eac434c8 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 30 Jan 2026 17:06:37 +0100 cc1: Fix pointer cast type 475fa03250d04142fb1aeb9635ffe7e3eac434c8 2026-01-30T14:44:17Z 2026-01-30T14:49:50Z cc1: Add support for float constant Roberto E. Vargas Caballero k0ga@shike2.net commit 475fa03250d04142fb1aeb9635ffe7e3eac434c8 parent c3b8a3ef1ef7df8ae85b1d0b9061725a02c356dc Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 30 Jan 2026 15:44:17 +0100 cc1: Add support for float constant Strtold already manages all the complexity of dealing with floating point numbers. c3b8a3ef1ef7df8ae85b1d0b9061725a02c356dc 2026-01-30T11:49:24Z 2026-01-30T14:49:50Z cc1: Add support for c99 float arithmetic Roberto E. Vargas Caballero k0ga@shike2.net commit c3b8a3ef1ef7df8ae85b1d0b9061725a02c356dc parent b057d1fdf510c655916a99184421b0197c5da056 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 30 Jan 2026 12:49:24 +0100 cc1: Add support for c99 float arithmetic C99 allows arithmetic operations to be performed in floats, while K&R and C90 promoted floats to double. This was the behaviour of scc until now, but this commit enables operations in float and also add folding of long double constants. b057d1fdf510c655916a99184421b0197c5da056 2026-01-30T09:42:53Z 2026-01-30T09:42:53Z cc1: Be careful about float optimizations Roberto E. Vargas Caballero k0ga@shike2.net commit b057d1fdf510c655916a99184421b0197c5da056 parent b8ad553523ba96ddf4c363befb1a5397b18af440 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 30 Jan 2026 10:42:53 +0100 cc1: Be careful about float optimizations As described in 5.1.2.3p14: Rearrangement for floating-point expressions is often restricted because of limitations in precision as well as range. The implementation cannot generally apply the mathematical associative rules for addition or multiplication, nor the distributive rule, because of roundoff error, even in the absence of overflow and underflow. Likewise, implementations cannot generally replace decimal constants in order to rearrange expressions. In the following fragment, rearrangements suggested by mathematical rules for real numbers are often not valid. b8ad553523ba96ddf4c363befb1a5397b18af440 2026-01-29T19:53:34Z 2026-01-29T19:53:34Z cc1: Fold correctly unary in sizeof Roberto E. Vargas Caballero k0ga@shike2.net commit b8ad553523ba96ddf4c363befb1a5397b18af440 parent 7dbb2d53125f9592cf579c0e948c56eb886a8a3c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 29 Jan 2026 20:53:34 +0100 cc1: Fold correctly unary in sizeof When a parenthesis happens after a sizeof it can mean a type name or an unary expression. The code was correctly detecting the type name case, but in the unary case it assumed that the unary expresion was equal to ( expr ) but unary can be also ( expr ) postfix, failling in cases like: sizeof(array)[0] 7dbb2d53125f9592cf579c0e948c56eb886a8a3c 2026-01-29T19:22:24Z 2026-01-29T19:22:24Z cc1: Use int for namespaces Roberto E. Vargas Caballero k0ga@shike2.net commit 7dbb2d53125f9592cf579c0e948c56eb886a8a3c parent 8e07fdb59f3eaca0e5e8ad160f4d2ae37270360e Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 29 Jan 2026 20:22:24 +0100 cc1: Use int for namespaces The code in decl.c was protecting against overflow using INT_MAX, but the Symbols and types were using unsigned char or char, that made mismatching when the lookup was performed. 8e07fdb59f3eaca0e5e8ad160f4d2ae37270360e 2026-01-29T14:48:18Z 2026-01-29T14:48:18Z cc1: Parse correctly **/ comments Roberto E. Vargas Caballero k0ga@shike2.net commit 8e07fdb59f3eaca0e5e8ad160f4d2ae37270360e parent 661b5b01217b553c0e0b142ae41bdf9c9b2ac14b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 29 Jan 2026 15:48:18 +0100 cc1: Parse correctly **/ comments The parser was consuming always a character when a * was found, making that even number of * followed by a / were not considered an end of comment. 661b5b01217b553c0e0b142ae41bdf9c9b2ac14b 2026-01-29T12:35:25Z 2026-01-29T12:35:25Z cc1: Accept digits in macro parameters Roberto E. Vargas Caballero k0ga@shike2.net commit 661b5b01217b553c0e0b142ae41bdf9c9b2ac14b parent b04e1786f2fbbf3976b6d0aba4cc122aefd23bc7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 29 Jan 2026 13:35:25 +0100 cc1: Accept digits in macro parameters The last changes about parsing macro definitions creates a new bug because they defined identifiers only using alpha and _ characters, but it should accept digits after the 1st character. b04e1786f2fbbf3976b6d0aba4cc122aefd23bc7 2026-01-29T11:36:50Z 2026-01-29T11:36:50Z cc1: Fix elif handling Roberto E. Vargas Caballero k0ga@shike2.net commit b04e1786f2fbbf3976b6d0aba4cc122aefd23bc7 parent 740fd29faa97cc8a39c7e48c368191bc2df9cc99 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 29 Jan 2026 12:36:50 +0100 cc1: Fix elif handling The code was assuming that an #else was always inverting the state of the preprocessor output, and elif was handled like a #else plus a #if, but that was not the actual case. The code tried to manage this situation counting the number of nested enabling/disabling of cppoff, but it was a non sense because we already had a stack of cpp contexts that could do the work much better. Also, we needed a sticky variable (called "done" in this commit) to track that one case of the if-else chain was true before, because the "enabled" field changes and then we forget the history of the chain. 740fd29faa97cc8a39c7e48c368191bc2df9cc99 2026-01-29T11:25:29Z 2026-01-29T11:25:29Z cc1: Simplify getdefs() Roberto E. Vargas Caballero k0ga@shike2.net commit 740fd29faa97cc8a39c7e48c368191bc2df9cc99 parent 58a4f1584eb24dd4204d8b4d87b06a11acede509 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 29 Jan 2026 12:25:29 +0100 cc1: Simplify getdefs() We can unify the IDEN and string cases if we use yytext/yylen in the case of IDEN because the STRING case is handled by the tokenizer to avoid code duplication. 58a4f1584eb24dd4204d8b4d87b06a11acede509 2026-01-28T14:12:29Z 2026-01-28T14:12:29Z cc1: Remove macro tokens from the tokenizer Roberto E. Vargas Caballero k0ga@shike2.net commit 58a4f1584eb24dd4204d8b4d87b06a11acede509 parent dcde10bc7be69fa1c7e497f67754f5323649f5cf Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 28 Jan 2026 15:12:29 +0100 cc1: Remove macro tokens from the tokenizer The macro definitions are currently handled by the preprocessor itself which means that the tokenizer should not see these tokens anymore in a valid sequence, and it means that we can remove it. dcde10bc7be69fa1c7e497f67754f5323649f5cf 2026-01-28T13:58:35Z 2026-01-28T13:58:35Z cc1: Rewrite macro defintion parser Roberto E. Vargas Caballero k0ga@shike2.net commit dcde10bc7be69fa1c7e497f67754f5323649f5cf parent fad9e0fb2e77d701992ea2e740f8c3bb67e9a049 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 28 Jan 2026 14:58:35 +0100 cc1: Rewrite macro defintion parser The macro definition parser was based in the tokenizer used by cc1 but it means that the input string was modified adding spaces around the tokens, which in normal use cases does not generate any problems. Some people does things like: #define STDIO <stdio.h> #include STDIO that is not conformant becuase the preprocessor is allowed to work based in C tokens that would split the previous macro in: < stdio . h > This commits modifies the parser of macro definitions to not using the tokenizer (except in the case of strings) and preserve the input string as much as possible. fad9e0fb2e77d701992ea2e740f8c3bb67e9a049 2026-01-27T12:12:06Z 2026-01-27T12:12:06Z libc: Add missed bits/wchar.h to the proto file Roberto E. Vargas Caballero k0ga@shike2.net commit fad9e0fb2e77d701992ea2e740f8c3bb67e9a049 parent fbf964d8de9d5dc603d674e67f9c1236373827e6 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 27 Jan 2026 13:12:06 +0100 libc: Add missed bits/wchar.h to the proto file fbf964d8de9d5dc603d674e67f9c1236373827e6 2026-01-27T11:11:06Z 2026-01-27T11:11:06Z libc: Protect redefinitions of __va_list and __wchar Roberto E. Vargas Caballero k0ga@shike2.net commit fbf964d8de9d5dc603d674e67f9c1236373827e6 parent b392aeafa794ca5b5aecdf93475c3869af3a9747 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 27 Jan 2026 12:11:06 +0100 libc: Protect redefinitions of __va_list and __wchar b392aeafa794ca5b5aecdf93475c3869af3a9747 2026-01-27T08:55:06Z 2026-01-27T08:59:41Z cc1: Remove NR_MAXSTRUCTS Roberto E. Vargas Caballero k0ga@shike2.net commit b392aeafa794ca5b5aecdf93475c3869af3a9747 parent 0b09e68a1bc71be5eaa5754c98365cf677992aed Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 27 Jan 2026 09:55:06 +0100 cc1: Remove NR_MAXSTRUCTS This limit is not defined by any standard, and it was creating an artificial limit that does not help at all to discover non portable programs because it checked for something useless. 0b09e68a1bc71be5eaa5754c98365cf677992aed 2026-01-24T10:51:44Z 2026-01-24T10:51:44Z Merge remote-tracking branch 'origin' Roberto E. Vargas Caballero k0ga@shike2.net commit 0b09e68a1bc71be5eaa5754c98365cf677992aed parent dc99102efafb82f90ae3f39ce98f30e06f94335b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 24 Jan 2026 11:51:44 +0100 Merge remote-tracking branch 'origin' dc99102efafb82f90ae3f39ce98f30e06f94335b 2026-01-24T10:50:19Z 2026-01-24T10:50:19Z tests: Avoid using mktemp Roberto E. Vargas Caballero k0ga@shike2.net commit dc99102efafb82f90ae3f39ce98f30e06f94335b parent 68568d529414af1522832b6fe63bf163306e0c8f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 24 Jan 2026 11:50:19 +0100 tests: Avoid using mktemp Mktemp is not posix and it is usually not needed for our use case. 68568d529414af1522832b6fe63bf163306e0c8f 2026-01-24T10:47:43Z 2026-01-24T10:47:43Z build: Use exit $? in signal traps Roberto E. Vargas Caballero k0ga@shike2.net commit 68568d529414af1522832b6fe63bf163306e0c8f parent a4f6e0ebf74b40d95b8d4de20bd0eb890efefaf3 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 24 Jan 2026 11:47:43 +0100 build: Use exit $? in signal traps This helps to preserve the exit status instead of just using 1 for all the signals. 8e32d090646d3eddcd4206c11920afc3a2c89137 2026-01-16T12:15:44Z 2026-01-16T15:22:20Z cc1: Fix comment typos Zhaoming Luo zhml@posteo.com commit 8e32d090646d3eddcd4206c11920afc3a2c89137 parent cd97844f7cd875616f4b97c675b08ce41aee9df3 Author: Zhaoming Luo <zhml@posteo.com> Date: Fri, 16 Jan 2026 12:15:44 +0000 cc1: Fix comment typos cd97844f7cd875616f4b97c675b08ce41aee9df3 2026-01-16T12:15:42Z 2026-01-16T15:22:00Z doc: Fix typo in README Zhaoming Luo zhml@posteo.com commit cd97844f7cd875616f4b97c675b08ce41aee9df3 parent 52cf2e9986d52e8e812a30b94dc118dabb1aea1f Author: Zhaoming Luo <zhml@posteo.com> Date: Fri, 16 Jan 2026 12:15:42 +0000 doc: Fix typo in README a4f6e0ebf74b40d95b8d4de20bd0eb890efefaf3 2026-01-06T00:14:33Z 2026-01-06T00:14:33Z build: Preserve exit status scripts/config Roberto E. Vargas Caballero k0ga@shike2.net commit a4f6e0ebf74b40d95b8d4de20bd0eb890efefaf3 parent 52cf2e9986d52e8e812a30b94dc118dabb1aea1f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 6 Jan 2026 01:14:33 +0100 build: Preserve exit status scripts/config 52cf2e9986d52e8e812a30b94dc118dabb1aea1f 2026-01-05T21:22:18Z 2026-01-05T21:22:18Z libmach: Add findseg() Roberto E. Vargas Caballero k0ga@shike2.net commit 52cf2e9986d52e8e812a30b94dc118dabb1aea1f parent ece7fade7d459523af266428e95b4f587a2f0ba9 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 5 Jan 2026 22:22:18 +0100 libmach: Add findseg() This function returns the segment index in the map. This function is mainly designed to be used in elf where there is a difference between sections and segments. ece7fade7d459523af266428e95b4f587a2f0ba9 2026-01-05T20:33:03Z 2026-01-05T20:52:49Z tests/libc: Add 0067-wcwidth Roberto E. Vargas Caballero k0ga@shike2.net commit ece7fade7d459523af266428e95b4f587a2f0ba9 parent 361a63ace0c9cec71586b8c6f79397a981c32589 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 5 Jan 2026 21:33:03 +0100 tests/libc: Add 0067-wcwidth 361a63ace0c9cec71586b8c6f79397a981c32589 2026-01-05T20:19:16Z 2026-01-05T20:51:16Z objdump: Fix format string in dumpscns() Roberto E. Vargas Caballero k0ga@shike2.net commit 361a63ace0c9cec71586b8c6f79397a981c32589 parent 0f88acf52504636f56b73132285c7355b1beb0af Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 5 Jan 2026 21:19:16 +0100 objdump: Fix format string in dumpscns() 0f88acf52504636f56b73132285c7355b1beb0af 2026-01-05T19:24:01Z 2026-01-05T20:51:16Z libc: Include a mbstate_t in FILE Roberto E. Vargas Caballero k0ga@shike2.net commit 0f88acf52504636f56b73132285c7355b1beb0af parent 84128eaf37e33fed023f271018b157b7398ad91c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 5 Jan 2026 20:24:01 +0100 libc: Include a mbstate_t in FILE Several of the file operations related to wchar require a mbstate_t, and every stream should have its own mbstate_t and not using the hidden state of several of the conversion functions. 84128eaf37e33fed023f271018b157b7398ad91c 2026-01-04T20:18:49Z 2026-01-04T20:18:49Z libc/stdlib: Minor improvements to realloc() Roberto E. Vargas Caballero k0ga@shike2.net commit 84128eaf37e33fed023f271018b157b7398ad91c parent ae0058502d81d2742783b1d1800784319341ff12 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 21:18:49 +0100 libc/stdlib: Minor improvements to realloc() ae0058502d81d2742783b1d1800784319341ff12 2026-01-04T20:14:43Z 2026-01-04T20:14:43Z libc/wchar: Whitespace change Roberto E. Vargas Caballero k0ga@shike2.net commit ae0058502d81d2742783b1d1800784319341ff12 parent 117e2caee5ca7b1441e2e4c4135c2aaac7b5cc78 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 21:14:43 +0100 libc/wchar: Whitespace change 117e2caee5ca7b1441e2e4c4135c2aaac7b5cc78 2026-01-04T20:09:03Z 2026-01-04T20:09:03Z tests: Minor improvements Roberto E. Vargas Caballero k0ga@shike2.net commit 117e2caee5ca7b1441e2e4c4135c2aaac7b5cc78 parent 0f61a6528784b5add0eef1d64ea16eb5adf689f9 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 21:09:03 +0100 tests: Minor improvements 0f61a6528784b5add0eef1d64ea16eb5adf689f9 2026-01-04T19:48:34Z 2026-01-04T20:06:08Z libc/string: Minor improvements Roberto E. Vargas Caballero k0ga@shike2.net commit 0f61a6528784b5add0eef1d64ea16eb5adf689f9 parent 9a60d2a80efcd85c85f90b1c0406c8fe3f324f5b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 20:48:34 +0100 libc/string: Minor improvements 9a60d2a80efcd85c85f90b1c0406c8fe3f324f5b 2026-01-04T19:29:39Z 2026-01-04T20:06:08Z libc/wchar: Add wctob() Roberto E. Vargas Caballero k0ga@shike2.net commit 9a60d2a80efcd85c85f90b1c0406c8fe3f324f5b parent c4b7399c26bf3040f33b4760e162495d74d85d73 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 20:29:39 +0100 libc/wchar: Add wctob() c4b7399c26bf3040f33b4760e162495d74d85d73 2026-01-04T19:17:51Z 2026-01-04T19:22:52Z libc/wchar: Add btowc() Roberto E. Vargas Caballero k0ga@shike2.net commit c4b7399c26bf3040f33b4760e162495d74d85d73 parent 534e0b91e27ad3cb37404d696cd1c0044a8ebe18 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 20:17:51 +0100 libc/wchar: Add btowc() 534e0b91e27ad3cb37404d696cd1c0044a8ebe18 2026-01-04T18:47:25Z 2026-01-04T18:47:25Z tests/libc: Add 0043-wcsrtombs Roberto E. Vargas Caballero k0ga@shike2.net commit 534e0b91e27ad3cb37404d696cd1c0044a8ebe18 parent 005f4c376c05bd22e21761cf063ea76fb9338dc1 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 19:47:25 +0100 tests/libc: Add 0043-wcsrtombs 005f4c376c05bd22e21761cf063ea76fb9338dc1 2026-01-03T17:55:53Z 2026-01-03T17:55:53Z libc: Add wcstok Roberto E. Vargas Caballero k0ga@shike2.net commit 005f4c376c05bd22e21761cf063ea76fb9338dc1 parent b2eb6e5269977992d88d388ff30a078aa9101a42 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 18:55:53 +0100 libc: Add wcstok b2eb6e5269977992d88d388ff30a078aa9101a42 2026-01-03T17:37:44Z 2026-01-03T17:37:44Z libc: Reorder common-objs.mk Roberto E. Vargas Caballero k0ga@shike2.net commit b2eb6e5269977992d88d388ff30a078aa9101a42 parent 836ed99e5aa87033470b3594597070cb0e00148b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 18:37:44 +0100 libc: Reorder common-objs.mk 836ed99e5aa87033470b3594597070cb0e00148b 2026-01-03T16:47:00Z 2026-01-03T16:47:00Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit 836ed99e5aa87033470b3594597070cb0e00148b parent 452190b652a22d2d5ba1fbc2106bf7847944f582 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 17:47:00 +0100 Merge remote-tracking branch 'origin/master' 47361f9afa1e1b5b31f58052d3253e1067dcd773 2026-01-03T14:35:47Z 2026-01-03T14:35:47Z build: Build bootstrap make in scripts Roberto E. Vargas Caballero k0ga@shike2.net commit 47361f9afa1e1b5b31f58052d3253e1067dcd773 parent 5b69547863e7e3da563e26164c34f22585920377 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 15:35:47 +0100 build: Build bootstrap make in scripts Just to keep the top level directory cleaner. 5b69547863e7e3da563e26164c34f22585920377 2026-01-03T14:24:55Z 2026-01-03T14:24:55Z tests: Use $TEST in every scc invocation Roberto E. Vargas Caballero k0ga@shike2.net commit 5b69547863e7e3da563e26164c34f22585920377 parent 6d67d778d8a2bfe2093233d1fae81663f712aa2a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 15:24:55 +0100 tests: Use $TEST in every scc invocation using a variable before executing any of the commands allows to use emulators of checkers easilly just setting that variable. 6d67d778d8a2bfe2093233d1fae81663f712aa2a 2026-01-03T13:14:58Z 2026-01-03T14:23:30Z build: Fix use of trap Roberto E. Vargas Caballero k0ga@shike2.net commit 6d67d778d8a2bfe2093233d1fae81663f712aa2a parent c825c03e6f3b1e3a757a47c75d77ce57ebb1624d Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 14:14:58 +0100 build: Fix use of trap Using the same trap for EXIT and signals has the problem that signals don't finish the current execution. For that reason is better to use different traps and do the cleaning only in the EXIT trap while the signals just use exits that eventually will call the EXIT trap. 452190b652a22d2d5ba1fbc2106bf7847944f582 2025-11-18T15:47:52Z 2025-11-18T18:14:23Z include: Remove parameter names in prototypes Roberto E. Vargas Caballero k0ga@shike2.net commit 452190b652a22d2d5ba1fbc2106bf7847944f582 parent 87e4396fb51faf4eac6fbd0a853e8c9d93c88fa2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 18 Nov 2025 16:47:52 +0100 include: Remove parameter names in prototypes Just be consistent and apply the same style in all the files. 87e4396fb51faf4eac6fbd0a853e8c9d93c88fa2 2025-11-18T14:26:53Z 2025-11-18T18:14:23Z include: Remove extern in function declarations Roberto E. Vargas Caballero k0ga@shike2.net commit 87e4396fb51faf4eac6fbd0a853e8c9d93c88fa2 parent ad5bd51963863fe5a3c3ad58a1ae42d578aa8980 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 18 Nov 2025 15:26:53 +0100 include: Remove extern in function declarations This was introduced some time ago to follow some style but it does not help so much, and it only makes longer the declaration of the functions. ad5bd51963863fe5a3c3ad58a1ae42d578aa8980 2025-11-18T13:01:45Z 2025-11-18T18:12:31Z include: Remove T* types Roberto E. Vargas Caballero k0ga@shike2.net commit ad5bd51963863fe5a3c3ad58a1ae42d578aa8980 parent c825c03e6f3b1e3a757a47c75d77ce57ebb1624d Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 18 Nov 2025 14:01:45 +0100 include: Remove T* types These types didn't work very well, and at some point we stopped using them. Removing them makes the code more straigh forward and avoids some stupid casts in printf alike function calls. c825c03e6f3b1e3a757a47c75d77ce57ebb1624d 2025-11-18T10:46:36Z 2025-11-18T11:07:16Z doc: Remove outdated bug Roberto E. Vargas Caballero k0ga@shike2.net commit c825c03e6f3b1e3a757a47c75d77ce57ebb1624d parent 3d92a3b0d83de06ce99f320906711d2d21f9a0c4 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 18 Nov 2025 11:46:36 +0100 doc: Remove outdated bug 3d92a3b0d83de06ce99f320906711d2d21f9a0c4 2025-10-31T17:19:56Z 2025-10-31T17:19:56Z tests/ar: Fix file name in 0039-update.sh Roberto E. Vargas Caballero k0ga@shike2.net commit 3d92a3b0d83de06ce99f320906711d2d21f9a0c4 parent 1ed0ff0000999561feee336c289252faf2502a7e Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 31 Oct 2025 18:19:56 +0100 tests/ar: Fix file name in 0039-update.sh 1ed0ff0000999561feee336c289252faf2502a7e 2025-10-29T09:57:06Z 2025-10-29T09:57:06Z tests: Set error code Roberto E. Vargas Caballero k0ga@shike2.net commit 1ed0ff0000999561feee336c289252faf2502a7e parent 00bae5c394c9b1d31586ffa1ee2f77a3edcc6f0a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 29 Oct 2025 10:57:06 +0100 tests: Set error code Having a correct error code when make tests is executed helps to detect when a test failed. 00bae5c394c9b1d31586ffa1ee2f77a3edcc6f0a 2025-10-28T20:21:11Z 2025-10-28T20:21:11Z tests/make: Reduce the timeout for 0102-signal Roberto E. Vargas Caballero k0ga@shike2.net commit 00bae5c394c9b1d31586ffa1ee2f77a3edcc6f0a parent 65e5c373ca2fa947a604a1e0ea35843c8c104658 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 28 Oct 2025 21:21:11 +0100 tests/make: Reduce the timeout for 0102-signal This timeout never had to be changed, because changing it was only hiding the actual problem, which was a race condition due to the incorrect signal handling. 65e5c373ca2fa947a604a1e0ea35843c8c104658 2025-10-28T20:12:08Z 2025-10-28T20:12:08Z make: Use a local signal variable Roberto E. Vargas Caballero k0ga@shike2.net commit 65e5c373ca2fa947a604a1e0ea35843c8c104658 parent 93e07bb34a825734d760971f811ac43868fd8c48 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 28 Oct 2025 21:12:08 +0100 make: Use a local signal variable As the global stop variable is used in cleanup() we can be caught by one signal when we enter in cleanup but stop can be pointing to a different signal at the end of that function. 93e07bb34a825734d760971f811ac43868fd8c48 2025-10-28T20:10:31Z 2025-10-28T20:10:31Z scc-make: Avoid signal race conditions Roberto E. Vargas Caballero k0ga@shike2.net commit 93e07bb34a825734d760971f811ac43868fd8c48 parent e19109cd35b8d64480c74389b8faaedf5af9b0ed Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 28 Oct 2025 21:10:31 +0100 scc-make: Avoid signal race conditions Expecting ait to be interrupted by a signal is too risky and it is very easy to be caught by race conditions. The best option is to kill in the snal handler and lock signals until we are ready to deal with them. e19109cd35b8d64480c74389b8faaedf5af9b0ed 2025-10-17T07:40:03Z 2025-10-17T07:40:03Z tests/make: Increment timeout for 0102-signal Roberto E. Vargas Caballero k0ga@shike2.net commit e19109cd35b8d64480c74389b8faaedf5af9b0ed parent 6d9a517cf4c6b5133030b9744531340d22cef719 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 17 Oct 2025 09:40:03 +0200 tests/make: Increment timeout for 0102-signal This tests shows to be a bit flaky. Increment the time can help a bit. 6d9a517cf4c6b5133030b9744531340d22cef719 2025-10-16T11:22:18Z 2025-10-17T07:39:55Z build: Modify include path Roberto E. Vargas Caballero k0ga@shike2.net commit 6d9a517cf4c6b5133030b9744531340d22cef719 parent 6c3c992dc8f759f8c4052a4fb0d47d7681282664 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 16 Oct 2025 13:22:18 +0200 build: Modify include path 6c3c992dc8f759f8c4052a4fb0d47d7681282664 2025-08-05T12:00:25Z 2025-08-05T12:00:25Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit 6c3c992dc8f759f8c4052a4fb0d47d7681282664 parent 23c081533234d616d3cc57e5794ee1b9f2a87b63 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 5 Aug 2025 14:00:25 +0200 Merge remote-tracking branch 'origin/master' 23c081533234d616d3cc57e5794ee1b9f2a87b63 2025-08-05T11:53:18Z 2025-08-05T11:53:18Z make: Make cleanup void Roberto E. Vargas Caballero k0ga@shike2.net commit 23c081533234d616d3cc57e5794ee1b9f2a87b63 parent 7d92f9f22004c00fca2fe52a183b8d8e1a1bca6f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 5 Aug 2025 13:53:18 +0200 make: Make cleanup void It does not return any value ever, so it does not make sense to have it like int, and it created problems porting it to plan9. 2a2e57ae043b6d78a5dbd50761971d6508540729 2025-06-17T18:16:23Z 2025-06-17T19:05:29Z libc/malloc: Unify malloc and realloc Roberto E. Vargas Caballero k0ga@shike2.net commit 2a2e57ae043b6d78a5dbd50761971d6508540729 parent 2b33af36beceaf67507ab881f113d68a371a4f13 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 17 Jun 2025 20:16:23 +0200 libc/malloc: Unify malloc and realloc realloc(p, 0) should behave like malloc(0), but we were not setting the same errno values, and we were returning NULL in both cases, that makes more difficult to differentiate the case when 0 is passed and the case when we don't have enough memory. Given that the traditional behaviour was always to return a pointer that could be freed (and even that was the original behaviour in scc) this commit restores that behaviour. 2b33af36beceaf67507ab881f113d68a371a4f13 2025-06-17T19:04:13Z 2025-06-17T19:05:29Z tests/make: Unset MAKEFLAGS Roberto E. Vargas Caballero k0ga@shike2.net commit 2b33af36beceaf67507ab881f113d68a371a4f13 parent ac449d18a971e3e452e3f47cbd2af90b6a55ea18 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 17 Jun 2025 21:04:13 +0200 tests/make: Unset MAKEFLAGS Some make implementations set MAKEFLAGS to non portable values creating some problems when running the tests when we move from the driven make to the make under test. ac449d18a971e3e452e3f47cbd2af90b6a55ea18 2025-06-13T20:31:14Z 2025-06-17T16:41:17Z scc-make: parseargv(): properly handle the -- argument, add test. Z. Gilboa writeonce@midipix.org commit ac449d18a971e3e452e3f47cbd2af90b6a55ea18 parent 30255fb57a7b5abf021e417aa34f380ae92bdbbe Author: Z. Gilboa <writeonce@midipix.org> Date: Fri, 13 Jun 2025 20:31:14 +0000 scc-make: parseargv(): properly handle the -- argument, add test. 30255fb57a7b5abf021e417aa34f380ae92bdbbe 2025-06-14T07:42:49Z 2025-06-17T07:48:14Z .gitignore: add missing entry for /src/cmd/scc-dump. Z. Gilboa writeonce@midipix.org commit 30255fb57a7b5abf021e417aa34f380ae92bdbbe parent 63c66208e583d8538351428cb2d5bdf0aabe3e26 Author: Z. Gilboa <writeonce@midipix.org> Date: Sat, 14 Jun 2025 07:42:49 +0000 .gitignore: add missing entry for /src/cmd/scc-dump. 63c66208e583d8538351428cb2d5bdf0aabe3e26 2025-06-04T14:36:22Z 2025-06-04T14:36:22Z driver/posix: Enable QBE for any arch/abi Roberto E. Vargas Caballero k0ga@shike2.net commit 63c66208e583d8538351428cb2d5bdf0aabe3e26 parent 1f8f494a8504aa99052554476d86bcd0d6a7a1ba Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:36:22 +0200 driver/posix: Enable QBE for any arch/abi The validation for the correct combination of QBE, arch and abi is done when the qbe target selection is done, so we don't have to care about it when we select the scc backend used to generate the QBE IL. 1f8f494a8504aa99052554476d86bcd0d6a7a1ba 2025-06-04T14:31:49Z 2025-06-04T14:31:49Z driver/posix: Adjust qbe command line based in the target Roberto E. Vargas Caballero k0ga@shike2.net commit 1f8f494a8504aa99052554476d86bcd0d6a7a1ba parent d853268357f02d13ca7377e2391b8ebb6290daad Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:31:49 +0200 driver/posix: Adjust qbe command line based in the target Qbe supports multiple ABIs and they are selected using the command line flag -t. d853268357f02d13ca7377e2391b8ebb6290daad 2025-06-04T14:08:26Z 2025-06-04T14:08:26Z cc2: Add support for qbe riscv64 Roberto E. Vargas Caballero k0ga@shike2.net commit d853268357f02d13ca7377e2391b8ebb6290daad parent faf643c9afc0a74b276f24a8fdb4ba8552e351b3 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:08:26 +0200 cc2: Add support for qbe riscv64 faf643c9afc0a74b276f24a8fdb4ba8552e351b3 2025-06-04T14:08:07Z 2025-06-04T14:08:07Z cc2/arm64: Removed unused peep.c Roberto E. Vargas Caballero k0ga@shike2.net commit faf643c9afc0a74b276f24a8fdb4ba8552e351b3 parent 06266207ce41e9fa1b7c2232b0a0243481287fd6 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:08:07 +0200 cc2/arm64: Removed unused peep.c This file was only a placeholder for the times when we built a skeleton for arm64 without using qbe. As we don't build that skeleton anymore, it does not make sense to keep this placeholder anymore in the repository. 06266207ce41e9fa1b7c2232b0a0243481287fd6 2025-06-04T14:06:01Z 2025-06-04T14:06:01Z cc1: Add support for riscv64 Roberto E. Vargas Caballero k0ga@shike2.net commit 06266207ce41e9fa1b7c2232b0a0243481287fd6 parent 7d92f9f22004c00fca2fe52a183b8d8e1a1bca6f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:06:01 +0200 cc1: Add support for riscv64 7d92f9f22004c00fca2fe52a183b8d8e1a1bca6f 2025-05-27T18:19:30Z 2025-05-27T18:19:30Z build: Remove redundant make build Roberto E. Vargas Caballero k0ga@shike2.net commit 7d92f9f22004c00fca2fe52a183b8d8e1a1bca6f parent 6182ec6e314de95182742064f5bb2d80abf11c8c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 27 May 2025 20:19:30 +0200 build: Remove redundant make build Scc-make was already built before this rule began its execution. 6182ec6e314de95182742064f5bb2d80abf11c8c 2025-05-24T04:54:25Z 2025-05-24T04:57:54Z libc/vfprintf: Adjust variable types Roberto E. Vargas Caballero k0ga@shike2.net commit 6182ec6e314de95182742064f5bb2d80abf11c8c parent 9c55c9b38fb53863c83f8d59ea6241682b2ea463 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 24 May 2025 06:54:25 +0200 libc/vfprintf: Adjust variable types 9c55c9b38fb53863c83f8d59ea6241682b2ea463 2025-05-13T08:14:24Z 2025-05-13T08:14:24Z doc: Clarify how to use musl Roberto E. Vargas Caballero k0ga@shike2.net commit 9c55c9b38fb53863c83f8d59ea6241682b2ea463 parent 5900420c8566844b1e379dc62adb0467142f56d6 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 13 May 2025 10:14:24 +0200 doc: Clarify how to use musl