Skip to content

Commit 67c98fb

Browse files
authored
Using attribute
1 parent 76d781f commit 67c98fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

optimize_related.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# when clang/clang++ cannot deduce function matching
22
- Disable optimization using `#pragma clang optimize off` in the top of the function
33
- Ref: https://gcc.gnu.org/onlinedocs/gcc/Function-Specific-Option-Pragmas.html
4+
5+
# using attribute
6+
- `#pragma gcc optimize off` may not work well
7+
- `bool __attribute__((optimize("O0"))) myfunc()` will work

0 commit comments

Comments
 (0)