You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
3.9 KiB
HTML

<html lang="en">
<head>
<title>Preprocessing - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Syntax.html#Syntax" title="Syntax">
<link rel="next" href="Whitespace.html#Whitespace" title="Whitespace">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991-2015 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Preprocessing"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Whitespace.html#Whitespace">Whitespace</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Syntax.html#Syntax">Syntax</a>
<hr>
</div>
<h3 class="section">3.1 Preprocessing</h3>
<p><a name="index-preprocessing-114"></a>The <samp><span class="command">as</span></samp> internal preprocessor:
<a name="index-whitespace_002c-removed-by-preprocessor-115"></a>
<ul><li>adjusts and removes extra whitespace. It leaves one space or tab before
the keywords on a line, and turns any other whitespace on the line into
a single space.
<p><a name="index-comments_002c-removed-by-preprocessor-116"></a><li>removes all comments, replacing them with a single space, or an
appropriate number of newlines.
<p><a name="index-constants_002c-converted-by-preprocessor-117"></a><li>converts character constants into the appropriate numeric values.
</ul>
<p>It does not do macro processing, include file handling, or
anything else you may get from your C compiler's preprocessor. You can
do include file processing with the <code>.include</code> directive
(see <a href="Include.html#Include"><code>.include</code></a>). You can use the <span class="sc">gnu</span> C compiler driver
to get other &ldquo;CPP&rdquo; style preprocessing by giving the input file a
&lsquo;<samp><span class="samp">.S</span></samp>&rsquo; suffix. See <a href="../gcc/Overall-Options.html#Overall-Options">Options Controlling the Kind of Output</a>.
<p>Excess whitespace, comments, and character constants
cannot be used in the portions of the input text that are not
preprocessed.
<p><a name="index-turning-preprocessing-on-and-off-118"></a><a name="index-preprocessing_002c-turning-on-and-off-119"></a><a name="index-g_t_0023NO_005fAPP-120"></a><a name="index-g_t_0023APP-121"></a>If the first line of an input file is <code>#NO_APP</code> or if you use the
&lsquo;<samp><span class="samp">-f</span></samp>&rsquo; option, whitespace and comments are not removed from the input file.
Within an input file, you can ask for whitespace and comment removal in
specific portions of the by putting a line that says <code>#APP</code> before the
text that may contain whitespace or comments, and putting a line that says
<code>#NO_APP</code> after this text. This feature is mainly intend to support
<code>asm</code> statements in compilers whose output is otherwise free of comments
and whitespace.
</body></html>