⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0156-0157.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>



<HEAD>

<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=01 //-->

<!-- PAGES=0001-0736 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="0154-0155.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0158-0158.html">Next</A></CENTER></P>







<A NAME="PAGENUM-156"><P>Page 156</P></A>





<P>Options must be separate: _dr is quite different from

_d -r.

</P>



<P>Most _f and _W options have two contrary forms:

_fname and _fno_name (or _Wname and _Wno_name). Only the

nondefault forms are shown here.

</P>



<TABLE>



<TR><TD>

_c

</TD><TD>

Compile or assemble the source files, but do not link. The compiler output is

an object file corresponding to each source file.

</TD></TR><TR><TD>

_Dmacro

</TD><TD>

Define macro macro with the string

1 as its definition.

</TD></TR><TR><TD>

_Dmacro=defn

</TD><TD>

Define macro macro as defn.

</TD></TR><TR><TD>

_E

</TD><TD>

Stop after the preprocessing stage; do not run the compiler proper. The output

is preprocessed source code, which is sent to the standard output.

</TD></TR><TR><TD>

_fall_virtual

</TD><TD>

Treat all possible member functions as virtual, implicitly. All member

functions (except for constructor functions and new or delete member operators) are treated

as virtual functions of the class where they appear.

</TD></TR><TR><TD>

</TD><TD>

This does not mean that all calls to these member functions will be made

through the internal table of virtual functions. Under some circumstances, the compiler

can determine that a call to a given virtual function can be made directly; in these

cases the calls are direct in any case.

</TD></TR><TR><TD>

_fdollars_in_identifiers

</TD><TD>

Permit the use of

$ in identifiers. Traditional C allowed the character

$ to form part of identifiers; by default, GNU C also allows this. However, ANSI C forbids $

in identifiers, and GNU C++ also forbids it by default on most platforms (though

on some platforms it's enabled by default for GNU C++ as well).

</TD></TR><TR><TD>

_felide_constructors

</TD><TD>

Use this option to instruct the compiler to be smarter about when it can

elide constructors. Without this flag, GNU C++ and

cfront both generate effectively the same code for

</TD></TR></TABLE>





<!-- CODE //-->

<PRE>

                                              A foo ();

                                              A x (foo ()); // x initialized by `foo ()', no ctor called

                                              A y = foo (); // call to `foo ()' heads to temporary, // y is

                                              initialized from the temporary.

</PRE>

<!-- END CODE //-->



<TABLE>



<TR><TD>

</TD><TD>

Note the difference. With this flag, GNU C++ initializes

y directly from the call to foo() without going through a temporary.

</TD></TR><TR><TD>

_fenum_int_equiv

</TD><TD>

Normally GNU C++ allows conversion of

enum to int, but not the other way around. Use this option if you want GNU C++ to allow conversion of

int to enum as well.

</TD></TR><TR><TD>

_fexternal_templates

</TD><TD>

Produce smaller code for template declarations, by generating only a single copy

of each template function where it is defined. To use this option successfully, you

must also mark all files that use templates with either

#pragma implementation (the definition) or #pragma

interface (declarations).

</TD></TR><TR><TD>

</TD><TD>

When your code is compiled with

_fexternal_templates, all template instantiations are external. You must arrange for all necessary instantiations to appear in

the implementation file; you can do this with a

typedef that references each instantiation needed. Conversely, when you compile using the default option

_fno_ external_templates, all template instantiations are explicitly internal.

</TD></TR><TR><TD>

_fno_gnu_linker

</TD><TD>

Do not output global initializations (such as C++ constructors and destructors)

in the form used by the GNU linker (on systems where the GNU linker is the

standard method of handling them). Use this option when you want to use a

non-GNU linker, which also requires using the

collect2 program to make sure the system linker includes constructors and destructors.

(collect2 is included in the GNU CC distribution.) For systems which must use

collect2, the compiler driver gcc is configured to do this automatically.

</TD></TR><TR><TD>

_fmemoize_lookups_fsave_memorized

</TD><TD>

These flags are used to get the compiler to compile programs faster using

heuristics. They are not on by default since they are only effective about half the time. The

other half of the time programs compile more slowly (and take more memory).

</TD></TR></TABLE>



<A NAME="PAGENUM-157"><P>Page 157</P></A>





<TABLE>



<TR><TD>

</TD><TD>

The first time the compiler must build a call to a member function (or reference to

a data member), it must (1) determine whether the class implements

member functions of that name; (2) resolve which member function to call (which

involves figuring out what sorts of type conversions need to be made); and (3) check

the visibility of the member function to the caller. All of this adds up to

slower compilation. Normally, the second time a call is made to that member function

(or reference to that data member), it must go through the same lengthy process

again. This means that code like this:

</TD></TR></TABLE>



<P>

                                             cout &lt;&lt; &quot;This &quot; &lt;&lt; p &lt;&lt; &quot;has&quot;&lt;&lt; n &lt;&lt; &quot; legs.\n&quot;;

</P>



<TABLE>



<TR><TD>

</TD><TD>

makes six passes through all three steps. By using a software cache, a &quot;hit&quot;

significantly reduces this cost. Unfortunately, using the cache introduces another layer

of mechanisms which must be implemented, and so incurs its own overhead.

_fmemorize_ lookups enables the software cache.

</TD></TR><TR><TD>

</TD><TD>

Because access privileges (visibility) to members and member functions may

differ from one function context to the next, g++ may need to flush the cache. With the

_fmemoize_lookups flag, the cache is flushed after every function that is compiled.

The _fsave_memorized flag enables the same software cache, but when the

compiler determines that the context of the last function compiled would yield the

same access privileges of the next function to compile, it preserves the cache. This is

most helpful when defining many member functions for the same class: with

the exception of member functions which are friends of other classes, each

member function has exactly the same access privileges as every other, and the cache need

not be flushed.

</TD></TR><TR><TD>

_fno_default_inline

</TD><TD>

Do not make member functions inline by default merely because they are

defined inside the class scope. Otherwise, when you specify

_O, member functions defined inside class scope are compiled inline by default; that is, you don't need to

add inline in front of the member function name.

</TD></TR><TR><TD>

_fno_strict_prototype

</TD><TD>

Consider the declaration

int foo;(). In C++, this means that the function

foo takes no arguments. In ANSI C, this is declared

int foo(void);. With the flag

_fno_strict_prototype, declaring functions with no arguments is equivalent to

declaring its argument list to be untyped, that is,

int foo(); is equivalent to saying int foo

(...);._fnonnull_objects. Normally, GNU C++ makes conservative

assumptions about objects reached through references. For example, the compiler must check

that a is not null in code like the following:

</TD></TR></TABLE>



<!-- CODE SNIP //-->

<PRE>

                                          obj &amp;a = g ();

                                          a.f (2);

</PRE>

<!-- END CODE SNIP //-->





<TABLE>



<TR><TD>

</TD><TD>

Checking that references of this sort have non-null values requires extra

code, however, and it is unnecessary for many programs. You can use

_fnonnull_objects to omit the checks for null, if your program doesn't require the default checking.

</TD></TR><TR><TD>

_fhandle_signatures_

</TD><TD>

These options control the recognition of  the signature and

sigof constructs for

</TD></TR><TR><TD>

fno_handle_signatures

</TD><TD>

specifying abstract types. By default, these constructs are not recognized.

</TD></TR><TR><TD>

_fthis_is_variable

</TD><TD>

The incorporation of user-defined free store management into C++ has

made assignment to this an anachronism. Therefore, by default GNU C++ treats the

type of this in a member function of class X to be

X *const. In other words, it is illegal to assign to this within a class member function. However, for backwards

compatibility, you can invoke the old behavior by using

_fthis_is_variable.

</TD></TR><TR><TD>

_g

</TD><TD>

Produce debugging information in the operating system's native format (for DBX

or SDB or DWARF). GDB also can work with this debugging information. On

most systems that use DBX format, _g enables use of extra debugging information

that only GDB can use.

</TD></TR><TR><TD>

</TD><TD>

Unlike most other C compilers, GNU CC allows you to use

_g with _0. The shortcuts taken by optimized code may occasionally produce surprising results:

some

</TD></TR></TABLE>







<P><CENTER>

<a href="0154-0155.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0158-0158.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -