diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/gcc~13/weak-pragmas.html | |
new repository
Diffstat (limited to 'devdocs/gcc~13/weak-pragmas.html')
| -rw-r--r-- | devdocs/gcc~13/weak-pragmas.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/devdocs/gcc~13/weak-pragmas.html b/devdocs/gcc~13/weak-pragmas.html new file mode 100644 index 00000000..04a9c865 --- /dev/null +++ b/devdocs/gcc~13/weak-pragmas.html @@ -0,0 +1,9 @@ +<div class="subsection-level-extent" id="Weak-Pragmas"> <div class="nav-panel"> <p> Next: <a href="diagnostic-pragmas" accesskey="n" rel="next">Diagnostic Pragmas</a>, Previous: <a href="structure-layout-pragmas" accesskey="p" rel="prev">Structure-Layout Pragmas</a>, Up: <a href="pragmas" accesskey="u" rel="up">Pragmas Accepted by GCC</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div> <h1 class="subsection" id="Weak-Pragmas-1"><span>6.62.11 Weak Pragmas<a class="copiable-link" href="#Weak-Pragmas-1"> ¶</a></span></h1> <p>For compatibility with SVR4, GCC supports a set of <code class="code">#pragma</code> directives for declaring symbols to be weak, and defining weak aliases. </p> <dl class="table"> <dt> +<span><code class="code">#pragma weak <var class="var">symbol</var></code><a class="copiable-link" href="#index-pragma_002c-weak"> ¶</a></span> +</dt> <dd> +<p>This pragma declares <var class="var">symbol</var> to be weak, as if the declaration had the attribute of the same name. The pragma may appear before or after the declaration of <var class="var">symbol</var>. It is not an error for <var class="var">symbol</var> to never be defined at all. </p> </dd> <dt><code class="code">#pragma weak <var class="var">symbol1</var> = <var class="var">symbol2</var></code></dt> <dd><p>This pragma declares <var class="var">symbol1</var> to be a weak alias of <var class="var">symbol2</var>. It is an error if <var class="var">symbol2</var> is not defined in the current translation unit. </p></dd> </dl> </div><div class="_attribution"> + <p class="_attribution-p"> + © Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br> + <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Weak-Pragmas.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Weak-Pragmas.html</a> + </p> +</div> |
