Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




16.3. Function Attribute Syntax

Function attributes are specified as part of a function declaration. After the closing parenthesis of the functions arguments the keyword __attribute__ followed by the desired attributes in a set of double parenthesis. Here's a function with the pure attribute.

int my_func(int first, int second) __attribute__ ((pure));

Functions can have multiple attributes, to do this, separate the attributes with commas inside the double parenthesis.

  Published under the terms of the GNU General Public License Design by Interspire