https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107513
Bug ID: 107513 Summary: [Feature Request] Implement __attribute__((__nodebug__)) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: roi.jacobson1 at gmail dot com Target Milestone: --- Clang has __attribute__((__nodebug__)). When applied for types and functions it suppresses generation of debug information for those types or functions. This can greatly reduce binary sizes when compiling with debug symbols. As a very non representative measure: in a library I'm currently working on, by applying this attribute to some uninteresting 'forwarding' functions I see a 40% reduction in size (uncompressed and unrepresentative, but still). It is worth noting that this attribute is already used in libc++ and in some other libraries (for example Apple SIMD).