diff --git a/README.md b/README.md index 16698ff..3aa1293 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,22 @@ printf("new length: %zu\n", scary_length(a)); //=> 2 You can push elements with automatic memory extension, as much as you want. +Moreover, the `scary_push` is a _generic_ function, so this code + +```c +scary_push(&a, 0UL); +``` + +produces a warning by default with modern compilers like GCC 12. + +
warning: passing argument 1 of ‘scary_push_uint64’ from incompatible pointer type [-Wincompatible-pointer-types]
+    scary_push(&a, 0UL);
+               ^~
+               |
+               int **
+ +You can of course opt-in an option `-Werror` to prevent such typing mistakes. + And you'll see **magic** here: ```c