initial commit
authorThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Sun, 4 May 2025 14:03:01 +0000 (14:03 +0000)
committerThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Sun, 4 May 2025 14:03:01 +0000 (14:03 +0000)
developer/experiment/teste.sh [new file with mode: 0755]
developer/experiment/try_assign.c [deleted file]
developer/experiment/try_assign_0 [new file with mode: 0755]
developer/experiment/try_assign_0.c
developer/experiment/try_assign_0.o [new file with mode: 0644]
developer/experiment/try_assign_0.s [new file with mode: 0644]
developer/experiment/try_parameter.c [deleted file]
developer/experiment/try_pragma_macro.c [deleted file]

diff --git a/developer/experiment/teste.sh b/developer/experiment/teste.sh
new file mode 100755 (executable)
index 0000000..69640d0
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+
+! ! rmdir test_dir && echo "deleted test_dir"
+
+echo "done"
diff --git a/developer/experiment/try_assign.c b/developer/experiment/try_assign.c
deleted file mode 100644 (file)
index 959144a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdio.h>
-
-// Helper to stringify a macro argument
-#define STR(x) #x
-#define SHOW(x) STR(x)
-
-#define BAD(x ,y) x + y
-#assign (Z ,12)
-//#xassign (Z ,12)  // invalid directive
-
-// Macros to test argument parsing and expansion
-#define ZERO()         SHOW(ZERO())
-#define ONE(x)         SHOW(ONE(x))
-#define TWO(x ,y)      SHOW(TWO(x ,y))
-#define VAR(...)       SHOW(VAR(__VA_ARGS__))
-#define MIXED(x ,...)  SHOW(MIXED(x ,__VA_ARGS__))
-
-int main() {
-  int x = BAD(1 ,2);   // should work
-  printf("x:%x\n" ,x);
-
-  // int y = BAD(1 ,2 ,3);   // Too many args
-  printf("%s\n" ,ZERO());                   // "ZERO()"
-  printf("%s\n" ,ONE(42));                  // "ONE(42)"
-  printf("%s\n" ,TWO(a ,b));                // "TWO(a ,b)"
-  printf("%s\n" ,VAR());                    // "VAR()"
-  printf("%s\n" ,VAR(1));                   // "VAR(1)"
-  printf("%s\n" ,VAR(1 ,2 ,3));             // "VAR(1 ,2 ,3)"
-  printf("%s\n" ,MIXED(0));                 // "MIXED(0)"
-  printf("%s\n" ,MIXED(x ,y ,z));           // "MIXED(x ,y ,z)"
-  printf("%s\n" ,ONE((1 ,2)));              // "ONE((1 ,2))"
-  printf("%s\n" ,VAR((a ,b) ,c));           // "VAR((a ,b) ,c)"
-  return 0;
-}
diff --git a/developer/experiment/try_assign_0 b/developer/experiment/try_assign_0
new file mode 100755 (executable)
index 0000000..59dea2a
Binary files /dev/null and b/developer/experiment/try_assign_0 differ
index 959144a..1394ce8 100644 (file)
@@ -1,34 +1,5 @@
 #include <stdio.h>
 
-// Helper to stringify a macro argument
-#define STR(x) #x
-#define SHOW(x) STR(x)
-
-#define BAD(x ,y) x + y
-#assign (Z ,12)
-//#xassign (Z ,12)  // invalid directive
-
-// Macros to test argument parsing and expansion
-#define ZERO()         SHOW(ZERO())
-#define ONE(x)         SHOW(ONE(x))
-#define TWO(x ,y)      SHOW(TWO(x ,y))
-#define VAR(...)       SHOW(VAR(__VA_ARGS__))
-#define MIXED(x ,...)  SHOW(MIXED(x ,__VA_ARGS__))
-
 int main() {
-  int x = BAD(1 ,2);   // should work
-  printf("x:%x\n" ,x);
-
-  // int y = BAD(1 ,2 ,3);   // Too many args
-  printf("%s\n" ,ZERO());                   // "ZERO()"
-  printf("%s\n" ,ONE(42));                  // "ONE(42)"
-  printf("%s\n" ,TWO(a ,b));                // "TWO(a ,b)"
-  printf("%s\n" ,VAR());                    // "VAR()"
-  printf("%s\n" ,VAR(1));                   // "VAR(1)"
-  printf("%s\n" ,VAR(1 ,2 ,3));             // "VAR(1 ,2 ,3)"
-  printf("%s\n" ,MIXED(0));                 // "MIXED(0)"
-  printf("%s\n" ,MIXED(x ,y ,z));           // "MIXED(x ,y ,z)"
-  printf("%s\n" ,ONE((1 ,2)));              // "ONE((1 ,2))"
-  printf("%s\n" ,VAR((a ,b) ,c));           // "VAR((a ,b) ,c)"
   return 0;
 }
diff --git a/developer/experiment/try_assign_0.o b/developer/experiment/try_assign_0.o
new file mode 100644 (file)
index 0000000..db3aacd
Binary files /dev/null and b/developer/experiment/try_assign_0.o differ
diff --git a/developer/experiment/try_assign_0.s b/developer/experiment/try_assign_0.s
new file mode 100644 (file)
index 0000000..8377f2b
--- /dev/null
@@ -0,0 +1,21 @@
+       .file   "try_assign_0.c"
+       .text
+       .globl  main
+       .type   main, @function
+main:
+.LFB0:
+       .cfi_startproc
+       pushq   %rbp
+       .cfi_def_cfa_offset 16
+       .cfi_offset 6, -16
+       movq    %rsp, %rbp
+       .cfi_def_cfa_register 6
+       movl    $0, %eax
+       popq    %rbp
+       .cfi_def_cfa 7, 8
+       ret
+       .cfi_endproc
+.LFE0:
+       .size   main, .-main
+       .ident  "GCC: (Debian 12.2.0-14) 12.2.0"
+       .section        .note.GNU-stack,"",@progbits
diff --git a/developer/experiment/try_parameter.c b/developer/experiment/try_parameter.c
deleted file mode 100644 (file)
index fe23c4a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <stdio.h>
-
-#define N32· N96·
-
-int N96·i = 10;
-int N32·j = 20;
-
-int main(){
-  printf("N96·i :%x\n",N96·i);
-  printf("N32·j :%x\n",N96·j);
-  return 0;
-}
-
-/*
-
-  try_parameter.c:10:24: error: ‘N96·j’ undeclared (first use in this function); did you mean ‘N96·i’?
-   10 |   printf("N32·j :%x\n",N96·j);
-      |                        ^~~~~
-      |                        N96·i
-
-As of C99 a macro must have a space after it, so the `N32·` of `N32·j` is not being recognized.
-
-
-*/
diff --git a/developer/experiment/try_pragma_macro.c b/developer/experiment/try_pragma_macro.c
deleted file mode 100644 (file)
index 2cc0723..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// experiment/test_pragma_macro.c
-
-#include <stdio.h>
-
-// -- STEP 1: Should compile even if pragma is ignored
-#pragma message("Compiling test_pragma_macro.c")
-
-#define A AMACRO
-
-#pragma macro(A)
-
-// Uncomment to test extension behavior:
-// Expected behavior: defines MY_MACRO to have body "42"
-// Expected fallback: compiler error or ignored pragma
-// #pragma name(MY_MACRO, 42)
-
-#ifndef MY_MACRO
-#define MY_MACRO -1
-#endif
-
-int main(void) {
-    printf("MY_MACRO expands to: %d\n", MY_MACRO);
-
-    #ifdef AMACRO
-      printf("AMACRO DEFINED!");
-    #endif
-    return 0;
-}
-
-/*
-nvoking a non-existing pragma is ignored without the -Wall
-
-2025-05-01T13:29:48Z[developer]
-Thomas-developer@StanleyPark§/home/Thomas/subu_data/developer/N/developer/experiment§
-> gcc -Wall try_pragma_macro.c 
-try_pragma_macro.c:6:9: note: ‘#pragma message: Compiling test_pragma_macro.c’
-    6 | #pragma message("Compiling test_pragma_macro.c")
-      |         ^~~~~~~
-try_pragma_macro.c:11: warning: ignoring ‘#pragma macro ’ [-Wunknown-pragmas]
-   11 | #pragma macro(A)
-      | 
-
-*/