Home
       tests/cc: Add 0227-sizeof test - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 36b8769dd5c503c420bb9404c0f0c2d4bfd2db82
   DIR parent 4a0c2ccd2a49423967a9f0826bdfc012739327c7
  HTML Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
       Date:   Mon,  7 Oct 2024 17:18:31 +0200
       
       tests/cc: Add 0227-sizeof test
       
       Diffstat:
         A tests/cc/execute/0227-sizeof.c      |       9 +++++++++
         M tests/cc/execute/scc-tests.lst      |       1 +
       
       2 files changed, 10 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/tests/cc/execute/0227-sizeof.c b/tests/cc/execute/0227-sizeof.c
       @@ -0,0 +1,9 @@
       +int
       +main()
       +{
       +        char s[sizeof "\0a" - 1] = "\0a";
       +
       +        if (s[0] != 0 && s[1] != 'a')
       +                return 1;
       +        return 0;
       +}
   DIR diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst
       @@ -217,3 +217,4 @@
        0224-macro.c
        0225-func.c
        0226-pointer.c
       +0227-sizeof.c