Technical Support
On-Line Manuals
Compiler Reference Guide
Version 6.15
This variable attribute informs the compiler that a static variable is to be retained in the object file, even if it is unreferenced.
Data marked with __attribute__((used)) is tagged in the object file to avoid removal by linker unused section removal.
__attribute__((used))
Static functions can also be marked as used, by using __attribute__((used)).
static int lose_this = 1; static int keep_this __attribute__((used)) = 2; // retained in object file static int keep_this_too __attribute__((used)) = 3; // retained in object file
Cookie Settings | Terms of Use | Privacy | Accessibility | Trademarks | Contact Us | Feedback
Copyright © 2005-2019 Arm Limited (or its affiliates). All rights reserved.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
Change Settings
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.