Skip to content

Commit d02b894

Browse files
bagderthomasnyman
authored andcommitted
Update Compiler-Options-Hardening-Guide-for-C-and-C++.md
make the fallthrough macro look like a function call Signed-off-by: Daniel Stenberg <[email protected]>
1 parent ed900ae commit d02b894

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ The C17 standard[^C2017] does not provide a mechanism to mark intentional fallth
324324

325325
~~~c
326326
#if __has_attribute(__fallthrough__)
327-
# define fallthrough __attribute__((__fallthrough__))
327+
# define fallthrough() __attribute__((__fallthrough__))
328328
#else
329-
# define fallthrough do {} while (0) /* fallthrough */
329+
# define fallthrough() do {} while (0) /* fallthrough */
330330
#endif
331331
~~~
332332

0 commit comments

Comments
 (0)