Explore three source-level annotations that you can use to help detect out-of-bounds accesses across function call boundaries in GCC 11.
Explore more features in GCC 11 that can help detect dynamic memory bugs in C and C++, and learn about the compiler's limitations.
Dynamic memory management bugs are hard to find and frequently targeted in C and C++ programs, but GCC 11's enhanced malloc attribute is here to help.
In part 2 of this series, avoid aliasing restrictions with programming language exemptions and compiler extensions, and explore possible resulting problems.
In part 1 of this series, explore C/C++ language restrictions, their challenges and pitfalls, and examples demonstrating their benefits in optimized code.
Martin Sebor looks at C string handling functions used to copy and concatenate strings and examines ways to improve their efficiency.
This article focuses on flow-based warnings that have increasingly been implemented in what GCC calls the "middle end." Limitations of middle-end warnings are discussed, as are false positives in middle-end warnings and possible solutions.
This article sheds light on how warnings work in GCC, why some warnings are false, and when warnings might not be output. Also discussed are the trade-offs made when implementing checks in GCC.