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.
82 lines
3.9 KiB
HTML
82 lines
3.9 KiB
HTML
15 years ago
|
<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.7">
|
||
|
<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, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002,
|
||
|
2006, 2007 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.1
|
||
|
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''.
|
||
|
|
||
|
man end-->
|
||
|
<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; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="node">
|
||
|
<p>
|
||
|
<a name="Preprocessing"></a>Next: <a rel="next" accesskey="n" href="Whitespace.html#Whitespace">Whitespace</a>,
|
||
|
Up: <a rel="up" accesskey="u" href="Syntax.html#Syntax">Syntax</a>
|
||
|
<hr><br>
|
||
|
</div>
|
||
|
|
||
|
<h3 class="section">3.1 Preprocessing</h3>
|
||
|
|
||
|
<p><a name="index-preprocessing-114"></a>The <span class="command">as</span> 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 “CPP” style preprocessing by giving the input file a
|
||
|
<span class="samp">.S</span> suffix. See <a href="../gcc/Overall-Options.html#Overall-Options">Options Controlling the Kind of Output (Using GNU CC)</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-_0023NO_005fAPP-120"></a><a name="index-_0023APP-121"></a>If the first line of an input file is <code>#NO_APP</code> or if you use the
|
||
|
<span class="samp">-f</span> 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>
|
||
|
|