Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
tadd committed Oct 28, 2024
1 parent e768734 commit 3834d47
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ 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.
<pre><code><b>warning:</b> passing argument 1 of ‘scary_push_uint64’ from incompatible pointer type [-Wincompatible-pointer-types]
scary_push(<emph>&a</emph>, 0UL);
^~
|
int **
</code></pre>
You can of course opt-in an option `-Werror` to prevent such typing mistakes.
And you'll see **magic** here:
```c
Expand Down

0 comments on commit 3834d47

Please sign in to comment.