blob: 71a5e9702eda18a172477f44edfaa815482f8bb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>skalibs: the gccattributes header</title>
<meta name="Description" content="skalibs: the gccattributes header" />
<meta name="Keywords" content="skalibs header gccattributes gcc attributes" />
<!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">libstddjb</a><br />
<a href="../libskarnet.html">libskarnet</a><br />
<a href="../index.html">skalibs</a><br />
<a href="http://skarnet.org/software/">Software</a><br />
<a href="http://skarnet.org/">skarnet.org</a>
</p>
<h1> The <tt>skalibs/gccattributes.h</tt> header </h1>
<p>
<tt>skalibs/gccattributes.h</tt> is a set of wrappers around
<a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html">gcc
attributes</a> (duh). It defines macros that are always valid, and
that have no effect if the compiler is not gcc or the used version
of gcc does not support the wanted attribute.
</p>
<p>
For instance:
</p>
<pre>
extern size_t str_len (char const *) gccattr_pure ;
</pre>
<p>
defines the <tt>str_len</tt> function as <em>pure</em> if it is
supported.
</p>
<p>
The source code is self-explanatory.
</p>
</body>
</html>
|