C Test Generation

******* annex_c_tests *******
make[1]: Entering directory '/home/doug/CCHATGPT/annex_c_tests'
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_D_ucn_identifiers test_annex_D_ucn_identifiers.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_A test_annex_A.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_J_portability test_annex_J_portability.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_K_bounds_checked test_annex_K_bounds_checked.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_I_warnings test_annex_I_warnings.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_C_sequence test_annex_C_sequence.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_L_analyzability test_annex_L_analyzability.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_F_iec60559 test_annex_F_iec60559.c  -lm
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_E_impl_limits test_annex_E_impl_limits.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_B test_annex_B.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_H_interchange test_annex_H_interchange.c  
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_G_complex test_annex_G_complex.c  -lm
gcc -std=c2x -Wall -Wextra -pedantic -o test_annex_M_change_history test_annex_M_change_history.c  
make[1]: Leaving directory '/home/doug/CCHATGPT/annex_c_tests'
******* ch6_c_tests *******
make[1]: Entering directory '/home/doug/CCHATGPT/ch6_c_tests'
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_10_embed test_6_10_embed.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_6_constexpr test_6_6_constexpr.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_11_future test_6_11_future.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_4_lexical test_6_4_lexical.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_10_preproc test_6_10_preproc.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_5_expressions test_6_5_expressions.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_2_concepts test_6_2_concepts.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_3_conversions test_6_3_conversions.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_8_statements test_6_8_statements.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_9_external_defs test_6_9_external_defs.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_6_7_declarations test_6_7_declarations.c  
make[1]: Leaving directory '/home/doug/CCHATGPT/ch6_c_tests'
******* ch7_c_tests *******
make[1]: Entering directory '/home/doug/CCHATGPT/ch7_c_tests'
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_16_stdarg test_7_16_stdarg.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_22_stdnoreturn test_7_22_stdnoreturn.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_17_stdatomic test_7_17_stdatomic.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_8_inttypes test_7_8_inttypes.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_6_fenv test_7_6_fenv.c  -lm
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_9_locale test_7_9_locale.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_24_time test_7_24_time.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_3_complex test_7_3_complex.c  -lm
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_18_stddef test_7_18_stddef.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_14_signal test_7_14_signal.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_19_stdint test_7_19_stdint.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_27_wchar test_7_27_wchar.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_5_errno test_7_5_errno.c  
test_7_5_errno.c: In function ‘main’:
test_7_5_errno.c:9:17: warning: unused variable ‘buf’ [-Wunused-variable]
    9 |   volatile char buf[1024];
      |                 ^~~
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_11_stdbool test_7_11_stdbool.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_20_stdio test_7_20_stdio.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_4_ctype test_7_4_ctype.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_29_tgmath test_7_29_tgmath.c  -lm
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_15_stdalign test_7_15_stdalign.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_12_stdbit test_7_12_stdbit.c  
test_7_12_stdbit.c: In function ‘main’:
test_7_12_stdbit.c:8:12: warning: unused variable ‘x’ [-Wunused-variable]
    8 |   unsigned x = 0b101100;
      |            ^
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_13_stdckdint test_7_13_stdckdint.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_23_string test_7_23_string.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_2_assert test_7_2_assert.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_21_stdlib test_7_21_stdlib.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_25_threads test_7_25_threads.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_7_float test_7_7_float.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_1_basics test_7_1_basics.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_28_wctype test_7_28_wctype.c  
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_10_math test_7_10_math.c  -lm
gcc -std=c2x -Wall -Wextra -pedantic -pthread -o test_7_26_uchar test_7_26_uchar.c  
make[1]: Leaving directory '/home/doug/CCHATGPT/ch7_c_tests'
******* appendixB_function_tests *******
make[1]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests'
********************** assert/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/assert'
Running assert_basic...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/assert'
********************** complex/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/complex'
Running ctan...
Running ctanh...
Running catan...
Running casinh...
Running conj...
Running cpow...
Running csqrt...
Running cexp...
Running casin...
Running catanh...
Running csin...
Running cacos...
Running csinh...
Running creal...
Running ccosh...
Running ccos...
Running clog...
Running cimag...
Running cproj...
Running carg...
cartesian(x, y): ( 1.0,  2.0)
polar(r, theta): ( 2.2,  1.1)
Running cabs...
Running cacosh...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/complex'
********************** ctype/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/ctype'
Running isspace...
Running isupper...
Running iscntrl...
Running isdigit...
Running isgraph...
Running islower...
Running tolower...
Running isalnum...
Running isblank...
Running isalpha...
Running toupper...
Running isxdigit...
Running ispunct...
Running isprint...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/ctype'
********************** fenv/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/fenv'
Running feholdexcept...
Running fesetround...
Running fesetexcept...
Running fe_dec_getround...
Running fe_dec_setround...
Running fesetmode...
Running feraiseexcept...
Running fegetround...
Running fesetexceptflag...
Running fegetexceptflag...
Running fegetenv...
Running fetestexcept...
Running fegetmode...
Running feupdateenv...
Running fetestexceptflag...
Running fesetenv...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/fenv'
********************** inttypes/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/inttypes'
Running imaxdiv...
Running imaxabs...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/inttypes'
********************** locale/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/locale'
Running localeconv...
Local Currency Symbol: 
International Currency Symbol: 
Local Currency Symbol: 
International Currency Symbol: 
Local Currency Symbol: 
International Currency Symbol: 
Decimal Point = .
Running setlocale...
Locale is: (null)
Date is: Fri Sep  5 06:48:22 2025
Locale is: (null)
Date is: Fri Sep  5 06:48:22 2025
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/locale'
********************** math/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/math'
rsqrt.c: In function ‘rsqrt’:
rsqrt.c:8:19: warning: ‘y’ is used uninitialized [-Wuninitialized]
    8 |         long i  = * ( long * ) &y;
      |                   ^~~~~~~~~~~~~~~
rsqrt.c:7:15: note: ‘y’ declared here
    7 |         float y  = f;
      |               ^
Running copysign...
Running acosh...
Running floor...
Running fdim...
Running modf...
Running fmax...
Running lgamma...
Running log...
Running fminimum...
fmin(1.230000, 10.000000) = 1.230000
Running log10p1...
log10p1(100.230000) = 3.000998
Running atan...
Running fmaximum...
fmaximum(1.230000, 2.230000) = 2.230000
Running exp...
Running asinpi...
Inverse of sin(-0.50) = -30.00 in degrees
Running exp2m1...
exp2m1(0) == 0
exp2m1(1) == 1.71828
exp2m1(2) == 6.38906
exp2m1(3) == 19.0855
Running nextafter...
Running hypot...
Running exp10m1...
exp10m1(0) == 0
exp10m1(1) == 9
exp10m1(2) == 99
exp10m1(3) == 999
Running rsqrt...
rsqrt(12.400000) = 0.283827
Running tanpi...
tanpi(0.250000) = 1.000000
Running roundeven...
Running frexp...
Running erfc...
Running powf...
powf(3.200000, 1.200000) = 4.038127
Running cbrt...
Running fabs...
Running exp2...
Running nextup...
Running compoundn...
compoundn(0.250000, 2) = 1.562500
Running remquo...
Running llogb...
Running ilogb...
Running acos...
Running asinh...
Running cos...
Running fmod...
Running acospi...
Inverse of cos(-0.50) = 120.00 in degrees
Running rootn...
rootn(14.000000) = 3.750000
Running tanh...
Running atan2pi...
atan2pi(1.00, 1.00) = 0.25 in degrees
Running rint...
Running nan...
Generated NaN value: nan
Running fma...
fma(1.230000, 10.000000, 2.000000) = 14.300000
Running trunc...
Running log10...
Running powl...
powl(3.200000, 1.200000) = 4.038127
Running round...
Running nearbyint...
Running ldexp...
Running tgamma...
Running atanpi...
Inverse of tan(1.00) = 45.00 in degrees
Running pow...
Running nexttoward...
Running logb...
Running exp10...
Running sin...
Running cosh...
Running atanh...
Running sinpi...
sinpi(0.250000) = 0.707107
Running ceil...
Running fmin...
Running expm1...
Running erf...
Running log2p1...
log2pi(0.250000) = -0.348504
Running canonicalize...
Running remainder...
Running asin...
asin(0.010000) = 0.010000
Running sinh...
Running log2...
Running atan2...
Running nextdown...
Running cospi...
cospi(1.230000) = -0.75
Running tan...
Running sqrt...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/math'
********************** misc/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/misc'
Running mktime...
Running strtok...
Running comparison...
Running fprintf...
Running following...
Running feclearexcept...
Running setlocale...
Number: 3.14
Date: Friday Fri 05 Sep 2025 06:48:31 AM PDT
Running cnd_wait...
Running frexp...
The Fraction and Exponential of 1.500000 are 0.750000 and 1
Running timegm...
Thursday 4/8/2025
Running getenv...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/misc'
********************** setjmp/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/setjmp'
Running setjmp_longjmp...
ok
Running longjmp...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/setjmp'
********************** signal/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/signal'
Running raise...
Running signal_raise...
Running signal...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/signal'
********************** stdarg/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/stdarg'
Running va_usage...
6
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/stdarg'
********************** stdio/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/stdio'
Running vprintf...
hi 1
Running snprintf...
Running fprintf...
Running vsprintf...
Running setbuf...
Running tmpfile...
Running fwrite...
Running scanf...
Running getchar...
Running ferror...
Running fgets...
Running vsnprintf...
Running printf...
hi 1
Running fflush...
Running ftell...
Running rewind...
Running vscanf...
Running vfprintf...
Running sscanf...
Running ungetc...
Running clearerr...
Running setvbuf...
Running fputs...
Running vsscanf...
Running tmpnam...
Running fsetpos...
Running fputc...
Running perror...
Running fclose...
Running fscanf...
Running putc...
Running getc...
Running fgetpos...
Running remove...
Running rename...
Running sprintf...
Running vfscanf...
Running feof...
Running puts...
hi
Running fopen...
Running freopen...
Running putchar...
ARunning fread...
Running fgetc...
Running fseek...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/stdio'
********************** stdlib/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/stdlib'
Running strtoll...
Running mbstowcs...
Running comparison...
Running atoi...
Running memalignment...
memalignment FAILED
Running mbtowc...
Running malloc...
Running strtol...
Running mblen...
Running strtoul...
Running strtod...
Running llabs...
Running _Exit...
Running atol...
Running lldiv...
Running atof...
Running aligned_alloc...
Running wcstombs...
Running system...
Running atoll...
Running wctomb...
Running rand...
Running abs...
Running srand...
Running strtoull...
Running realloc...
Running free...
Running labs...
Running atexit...
Running qsort...
Running abort...
Running ldiv...
Running bsearch...
Running exit...
Running div...
Running calloc...
Running getenv...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/stdlib'
********************** string/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/string'
Running strcoll...
Running strtok...
Running strdup...
strdup FAILED
Running strspn...
Running strcmp...
Running strcspn...
Running strrchr...
Running strcpy...
Running memmove...
Running memset...
Running strncmp...
world is greater than hello
Running strndup...
strndup FAILED
Running strncpy...
strncpy FAILED
Running strpbrk...
Running memccpy...
Running memchr...
Running strxfrm...
Running strstr...
Running strlen...
strlen FAILED
Running memcmp...
Running memcpy...
Running strcat...
Running strerror...
No such file or directory
Running strncat...
strncat FAILED
Running strchr...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/string'
********************** threads/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/threads'
Running mtx_unlock...
Running tss_get...
Running cnd_destroy...
Running mtx_lock...
Running mtx_trylock...
Running tss_delete...
Running cnd_broadcast...
Running mtx_init...
Running tss_set...
Running cnd_wait...
Running cnd_init...
Running tss_create...
Running cnd_timedwait...
Running mtx_timedlock...
Running mtx_destroy...
Running cnd_signal...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/threads'
********************** time/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/time'
Running mktime...
Running time...
Running strftime...
Running asctime...
Running clock...
clock FAILED
Running localtime...
Running ctime...
Current time = Fri Sep  5 06:48:42 2025
Running gmtime...
Running difftime...
Running timegm...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/time'
********************** uchar/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/uchar'
Running mbrtoc16...
Running c32rtomb...
Running mbrtoc8...
Running mbrtoc32...
Running c8rtomb...
c8rtomb FAILED
Running c16rtomb...
c16rtomb FAILED
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/uchar'
********************** wchar/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/wchar'
Running wcstok...
Running wmemmove...
Running wcrtomb...
Running wprintf...
Running vfwscanf...
Running fwide...
Running mbsrtowcs...
Running wcscspn...
Running wcschr...
Running fwprintf...
Running wcsncat...
Running wmemset...
Running wmemchr...
Running swprintf...
Running wctob...
Running ungetwc...
Running wctomb...
bytes=1
Running wscanf...
Running mbrtowc...
bytes=1
Running wcsftime...
Running wmemcmp...
Running fputwc...
Running fputws...
Running wmemcpy...
Running wcsxfrm...
Running fgetws...
Running btowc...
Running mbsinit...
Running vswprintf...
Running wcscat...
Running mbrlen...
Running mbstowcs...
bytes=2
Running vwprintf...
Running swscanf...
Running putwc...
Running wcstod...
Running getwc...
Running wcsstr...
Running wcsspn...
Running wcscmp...
Running wcscoll...
Running wcsrchr...
Running wcscpy...
Running vswscanf...
Running fwscanf...
Running wcsncmp...
Running mbtowc...
bytes=1
Running wcsncpy...
Running vfwprintf...
Running vwscanf...
Running wcspbrk...
Running wcsrtombs...
Running fgetwc...
Running putwchar...
Running wcslen...
Running getwchar...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/wchar'
********************** wctype/ **********************
make[2]: Entering directory '/home/doug/CCHATGPT/appendixB_function_tests/wctype'
Running iswupper...
Running iswgraph...
Running wctrans...
Running iswdigit...
Running towlower...
Running iswalpha...
Running towctrans...
towctrans FAILED
Running wctype...
A is an alphabetic character.
Running iswprint...
Running towupper...
Running iswxdigit...
Running iswpunct...
Running iswctype...
A is an alphabetic character.
Running iswlower...
Running iswspace...
Running iswblank...
Running iswcntrl...
Running iswalnum...
make[2]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests/wctype'
make[1]: Leaving directory '/home/doug/CCHATGPT/appendixB_function_tests'
******* ch6_ub_tests *******
make[1]: Entering directory '/home/doug/CCHATGPT/ch6_ub_tests'
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  12_modify_string_literal.c -o 12_modify_string_literal 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  16_deref_before_array.c -o 16_deref_before_array 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  03_unsequenced_modification.c -o 03_unsequenced_modification 
03_unsequenced_modification.c: In function ‘main’:
03_unsequenced_modification.c:5:7: warning: operation on ‘i’ may be undefined [-Wsequence-point]
    5 |     i = ++i + i;  // UB: unsequenced
      |     ~~^~~~~~~~~
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  11_effective_type_violation.c -o 11_effective_type_violation 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  03_pointer_out_of_bounds_deref.c -o 03_pointer_out_of_bounds_deref 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  18_int_to_pointer_invalid.c -o 18_int_to_pointer_invalid 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  17_walk_past_array.c -o 17_walk_past_array 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  10_pointer_compare_unrelated.c -o 10_pointer_compare_unrelated 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  19_pointer_to_struct_plus_one.c -o 19_pointer_to_struct_plus_one 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  25_effective_type_violation_struct.c -o 25_effective_type_violation_struct 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  22_cast_pointer_to_too_small_integer.c -o 22_cast_pointer_to_too_small_integer 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  18_call_through_null_function_pointer.c -o 18_call_through_null_function_pointer 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  09_div_mod_zero.c -o 09_div_mod_zero 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  08_shift_invalid.c -o 08_shift_invalid 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic  20_include_in_comment.c -o 20_include_in_comment 
20_include_in_comment.c:3:10: fatal error: //e: No such file or directory
    3 | #include "//e"
      |          ^~~~~
compilation terminated.
Makefile:16: recipe for target '20_include_in_comment' failed
make[1]: *** [20_include_in_comment] Error 1
make[1]: Leaving directory '/home/doug/CCHATGPT/ch6_ub_tests'
******* ch7_ub_tests *******
make[1]: Entering directory '/home/doug/CCHATGPT/ch7_ub_tests'
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  09_strcat_overlap.c -o 09_strcat_overlap 
09_strcat_overlap.c: In function ‘main’:
09_strcat_overlap.c:6:12: warning: passing argument 1 to ‘restrict’-qualified parameter aliases with argument 2 [-Wrestrict]
    6 |     strcat(s, s); // UB
      |            ^  ~
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  05_fwprintf_insufficient_args.c -o 05_fwprintf_insufficient_args 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  22_double_free.c -o 22_double_free 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  17_setvbuf_after_io.c -o 17_setvbuf_after_io 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  14_scanf_insufficient_pointers.c -o 14_scanf_insufficient_pointers 
14_scanf_insufficient_pointers.c: In function ‘main’:
14_scanf_insufficient_pointers.c:5:19: warning: format ‘%d’ expects a matching ‘int *’ argument [-Wformat=]
    5 |     scanf("%d %d %d", &a, &b); // UB: missing pointer for third %d
      |                  ~^
      |                   |
      |                   int *
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  11_printf_insufficient_args.c -o 11_printf_insufficient_args 
11_printf_insufficient_args.c: In function ‘main’:
11_printf_insufficient_args.c:4:21: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
    4 |     printf("num=%d %d\n", 1); // UB: missing one argument
      |                    ~^
      |                     |
      |                     int
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  10_printf_percent_n_wrong_type.c -o 10_printf_percent_n_wrong_type 
10_printf_percent_n_wrong_type.c: In function ‘main’:
10_printf_percent_n_wrong_type.c:5:14: warning: format ‘%n’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=]
    5 |     printf("%n\n", &x); // UB: not int*
      |             ~^     ~~
      |              |     |
      |              int * long int *
      |             %ln
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  13_scanf_type_mismatch.c -o 13_scanf_type_mismatch 
13_scanf_type_mismatch.c: In function ‘main’:
13_scanf_type_mismatch.c:5:13: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘double *’ [-Wformat=]
    5 |     scanf("%d", &x); // UB: %d expects int*
      |            ~^   ~~
      |             |   |
      |             |   double *
      |             int *
      |            %le
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  27_strncpy_overlap.c -o 27_strncpy_overlap 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  18_signal_invalid_handler.c -o 18_signal_invalid_handler 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  16_fclose_twice.c -o 16_fclose_twice 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  21_free_pointer_offset.c -o 21_free_pointer_offset 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  12_free_invalid_ptr.c -o 12_free_invalid_ptr 
12_free_invalid_ptr.c: In function ‘main’:
12_free_invalid_ptr.c:5:5: warning: attempt to free a non-heap object ‘x’ [-Wfree-nonheap-object]
    5 |     free(&x); // UB
      |     ^~~~~~~~
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  13_mbstowcs_overlap.c -o 13_mbstowcs_overlap 
13_mbstowcs_overlap.c: In function ‘main’:
13_mbstowcs_overlap.c:9:16: warning: implicit declaration of function ‘mbstowcs’; did you mean ‘mbsrtowcs’? [-Wimplicit-function-declaration]
    9 |     size_t r = mbstowcs((wchar_t*)s, s, 3); // UB due to overlap/wrong type usage
      |                ^~~~~~~~
      |                mbsrtowcs
13_mbstowcs_overlap.c:7:13: warning: unused variable ‘wbuf’ [-Wunused-variable]
    7 |     wchar_t wbuf[4];
      |             ^~~~
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  19_printf_read_past_string.c -o 19_printf_read_past_string 
19_printf_read_past_string.c: In function ‘bad’:
19_printf_read_past_string.c:5:12: warning: function returns address of local variable [-Wreturn-local-addr]
    5 |     return s; // returns pointer to dead object
      |            ^
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  08_printf_invalid_specifier.c -o 08_printf_invalid_specifier 
08_printf_invalid_specifier.c: In function ‘main’:
08_printf_invalid_specifier.c:4:14: warning: unknown conversion type character ‘r’ in format [-Wformat=]
    4 |     printf("%r\n", 42); // UB: invalid specifier
      |              ^
08_printf_invalid_specifier.c:4:12: warning: too many arguments for format [-Wformat-extra-args]
    4 |     printf("%r\n", 42); // UB: invalid specifier
      |            ^~~~~~
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  04_printf_type_mismatch.c -o 04_printf_type_mismatch 
04_printf_type_mismatch.c: In function ‘main’:
04_printf_type_mismatch.c:4:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat=]
    4 |     printf("%d\n", 3.14); // UB: %d expects int, got double
      |             ~^     ~~~~
      |              |     |
      |              int   double
      |             %f
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  20_free_invalid_pointer.c -o 20_free_invalid_pointer 
20_free_invalid_pointer.c: In function ‘main’:
20_free_invalid_pointer.c:5:5: warning: attempt to free a non-heap object ‘x’ [-Wfree-nonheap-object]
    5 |     free(&x); // UB
      |     ^~~~~~~~
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  03_toupper_out_of_range.c -o 03_toupper_out_of_range 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  25_memcpy_overlap.c -o 25_memcpy_overlap 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  36_iswalpha_bad_value.c -o 36_iswalpha_bad_value 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  11_iswalpha_bad_value.c -o 11_iswalpha_bad_value 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  28_strcat_overlap.c -o 28_strcat_overlap 
cc -std=c2x -O0 -g -Wall -Wextra -pedantic -pthread  01_assert_macro_suppressed.c -o 01_assert_macro_suppressed 
/usr/bin/ld: /tmp/ccFgMXSC.o: in function `main':
/home/doug/CCHATGPT/ch7_ub_tests/01_assert_macro_suppressed.c:7: undefined reference to `assert'
collect2: error: ld returned 1 exit status
Makefile:22: recipe for target '01_assert_macro_suppressed' failed
make[1]: *** [01_assert_macro_suppressed] Error 1
make[1]: Leaving directory '/home/doug/CCHATGPT/ch7_ub_tests'
Makefile:11: recipe for target 'all' failed
make: *** [all] Error 2