Studying note of GCC-3.4.6 source (25 cont2)

c_common_handle_option (continue)

 

657      case OPT_Wwrite_strings:

658        if (!c_dialect_cxx ())

659          flag_const_strings = value;

660        else

661          warn_write_strings = value;

662        break;

663 

664      case OPT_ansi:

665        if (!c_dialect_cxx ())

666          set_std_c89 (false, true);

667        else

668          set_std_cxx98 (true);

669        break;

670 

671      case OPT_d:

672        handle_OPT_d (arg);

673        break;

674 

675      case OPT_fcond_mismatch:

676        if (!c_dialect_cxx ())

677        {

678          flag_cond_mismatch = value;

679          break;

680        }

681        /* Fall through.  */

682 

683      case OPT_fall_virtual:

684      case OPT_falt_external_templates:

685      case OPT_fenum_int_equiv:

686      case OPT_fexternal_templates:

687      case OPT_fguiding_decls:

688      case OPT_fhonor_std:

689      case OPT_fhuge_objects:

690      case OPT_flabels_ok:

691      case OPT_fname_mangling_version_:

692      case OPT_fnew_abi:

693      case OPT_fnonnull_objects:

694      case OPT_fsquangle:

695      case OPT_fstrict_prototype:

696      case OPT_fthis_is_variable:

697      case OPT_fvtable_thunks:

698      case OPT_fxref:

699      case OPT_fvtable_gc:

700        warning ("switch /"%s/" is no longer supported", option->opt_text);

701        break;

702 

703      case OPT_faccess_control:

704        flag_access_control = value;

705        break;

706 

707      case OPT_fasm:

708        flag_no_asm = !value;

709        break;

710 

711      case OPT_fbuiltin:

712        flag_no_builtin = !value;

713        break;

 

Above c_dialect_cxx returns 1 if the langauge is C++, and sets below variables accordingly:

flag_const_strings (C, C++, -Wwrite-strings) if nonzero, means give string constants the type `const char *', as mandated by the standard.

warn_write_strings (C, C++, -Wwrite-strings) if nonzero, warns about deprecated conversion from string constant to `char *'.

Line 664 handles option –ansi which specifies the standard to which the code should conform; and saves its parameter by below funcitons.

 

1522 static void

1523 set_std_c89 (int c94, int iso)                                                                       in c-opts.c

1524 {

1525   cpp_set_lang (parse_in, c94 ? CLK_STDC94: iso ? CLK_STDC89: CLK_GNUC89);

1526   flag_iso = iso;

1527   flag_no_asm = iso;

1528   flag_no_gnu_keywords = iso;

1529   flag_no_nonansi_builtin = iso;

1530   flag_isoc94 = c94;

1531   flag_isoc99 = 0;

1532   flag_writable_strings = 0;

1533 }

 

Above, parse_in is a global object of cpp_reader. And the variables are:

flag_iso if nonzero, rejects macros in the user's namespace.

flag_no_asm (C, C++, ObjC, -fno-asm) if nonzero, for C, specifying -fno-asm disables the keywords asm, inline, and typeof. This option has no effect on the keywords __asm__, __inline__, and __typeof__. For C++, specifying -fno-asm disables the keyword typeof, but has no effect on asm and inline because they are part of the language. Other flags that effect these keywords are -ansi, -gnu-keywords, and -std.

flag_no_gnu_keywords (C++, -fno-gnu-keywords) if nonzero, disables the typeof keywords.

flag_no_nonansi_builtin (C++, -fno-nonansi-builtin) if nonzero, means don't recognize the non-ANSI builtin functions. -ansi sets this.

flag_isoc94 if nonzero, means enable C89 Amendment 1 features.

flag_isoc99 if nonzero, means use the ISO C99 dialect of C.

flag_writable_strings (C, C++, -fwritable-strings) if nonzero, stores string constants in data segment and doesn't uniquize them.

 

1549 static void

1550 set_std_cxx98 (int iso)                                                                               in c-opts.c

1551 {

1552   cpp_set_lang (parse_in, iso ? CLK_CXX98: CLK_GNUCXX);

1553   flag_no_gnu_keywords = iso;

1554   flag_no_nonansi_builtin = iso;

1555   flag_iso = iso;

1556 }

 

At line 671, for option -dletters, one or more letters can be listed to specify when a debugging dump (or dumps) should occur and what the dump is to contain. This option is for use in debugging the compiler by making it possible to examine detailed information at various stages of compilation. Each output file is identified with a suffix of the pass number followed by some identifying letters. For example, the file dumped following pass 21, which is global register allocation, while compiling doline.c would be named doline.21.greg.

Letters for the -d option can be inserted in any combination and in any order. This feature has been implemented strictly for purposes of debugging the compiler, so you will find that not all the letters are implemented in every release. Note that the letters D, I, M, and N, in current version, only used by preprocessor (but in version later than v4.0, these letters must be used in conjunction with –E to be specified for preprocessor; otherwise they have different meanings). In current version, these letters have following meanings:

Letter

Produce

D

in addition to the normal output after preprocessing, include all macro definitions in the output.

I

the preprocessor outputs the #include directives in addition to the other preprocessor output.

M

the preprocessor will output a list of the macro definitions in effect at the end of all preprocessing.

N

in addition to the normal output after preprocessing, include a list of all macros in the simplified form of #define name.

 

1575 static void

1576 handle_OPT_d (const char *arg)                                                                       in c-opts.c

1577 {

1578   char c;

1579

1580   while ((c = *arg++) != '/0')

1581     switch (c)

1582     {

1583       case 'M':                  /* Dump macros only.  */

1584       case 'N':                   /* Dump names.  */

1585       case 'D':                   /* Dump definitions.  */

1586         flag_dump_macros = c;

1587         break;

1588

1589       case 'I':

1590         flag_dump_includes = 1;

1591         break;

1592     }

1593 }

 

Back in c_common_handle_option, at line 678:

flag_cond_mismatch (C, -fcond-mismatch), if nonzero, means allow type mismatches in conditional expressions; just make their values `void'.

flag_access_control (C++, -faccess-control) if nonzero, means want to obey access control semantics.

flag_no_builtin (C, ObjC, -fno-builtin) if nonzero, means don't recognize the non-ANSI builtin functions.

 

c_common_handle_option (continue)

 

715      case OPT_fbuiltin_:

716        if (value)

717          result = 0;

718        else

719          disable_builtin_function (arg);

720        break;

721 

722      case OPT_fdollars_in_identifiers:

723        cpp_opts->dollars_in_ident = value;

724        break;

725 

726      case OPT_fdump_:

727        if (!dump_switch_p (arg))

728          result = 0;

729       break;

730 

731      case OPT_ffreestanding:

732        value = !value;

733        /* Fall through....  */

734      case OPT_fhosted:

735        flag_hosted = value;

736        flag_no_builtin = !value;

737        /* warn_main will be 2 if set by -Wall, 1 if set by -Wmain */

738        if (!value && warn_main == 2)

739          warn_main = 0;

740        break;

 

For current GCC, only –fno-builtin-function is supported. disabled_builtins saves the name of disabled function into list.

 

3491 void

3492 disable_builtin_function (const char *name)                                         in c-common.c

3493 {

3494   if (strncmp (name, "__builtin_", strlen ("__builtin_")) == 0)

3495     error ("cannot disable built-in function `%s'", name);

3496   else

3497   {

3498     disabled_builtin *new = xmalloc (sizeof (disabled_builtin));

3499     new->name = name;

3500     new->next = disabled_builtins;

3501     disabled_builtins = new;

3502   }

3503 }

 

Above, in c_common_handle_option, at line 735, flag_hosted (C, -fhosted) if nonzero, means the compiled program is to run in a hosted environment, which has the entire standard library available, and main() has a return type of int (the default value is 1).

 

c_common_handle_option (continue)

 

742      case OPT_fshort_double:

743        flag_short_double = value;

744        break;

745 

746      case OPT_fshort_enums:

747        flag_short_enums = value;

748        break;

749 

750      case OPT_fshort_wchar:

751        flag_short_wchar = value;

752        break;

753 

754      case OPT_fsigned_bitfields:

755        flag_signed_bitfields = value;

756        explicit_flag_signed_bitfields = 1;

757        break;

758 

759      case OPT_fsigned_char:

760        flag_signed_char = value;

761        break;

762 

763      case OPT_funsigned_bitfields:

764        flag_signed_bitfields = !value;

765        explicit_flag_signed_bitfields = 1;

766        break;

767 

768      case OPT_funsigned_char:

769        flag_signed_char = !value;

770        break;

771 

772      case OPT_fcheck_new:

773        flag_check_new = value;

774        break;

775 

776      case OPT_fconserve_space:

777        flag_conserve_space = value;

778        break;

779 

780      case OPT_fconst_strings:

781        flag_const_strings = value;

782        break;

783 

784      case OPT_fconstant_string_class_:

785        constant_string_class_name = arg;

786        break;

787 

788      case OPT_fdefault_inline:

789        flag_default_inline = value;

790        break;

791 

792      case OPT_felide_constructors:

793        flag_elide_constructors = value;

794        break;

795 

796      case OPT_fenforce_eh_specs:

797        flag_enforce_eh_specs = value;

798        break;

799 

800      case OPT_ffixed_form:

801      case OPT_ffixed_line_length_:

802        /* Fortran front end options ignored when preprocessing only.  */

803        if (!flag_preprocess_only)

804          result = 0;

805        break;

806 

807      case OPT_ffor_scope:

808        flag_new_for_scope = value;

809        break;

810 

811      case OPT_fgnu_keywords:

812        flag_no_gnu_keywords = !value;

813        break;

814 

815      case OPT_fgnu_runtime:

816        flag_next_runtime = !value;

817        break;

818 

819      case OPT_fhandle_exceptions:

820        warning ("-fhandle-exceptions has been renamed -fexceptions (and is now on by default)");

821        flag_exceptions = value;

822        break;

823 

824      case OPT_fimplement_inlines:

825        flag_implement_inlines = value;

826        break;

827 

828      case OPT_fimplicit_inline_templates:

829        flag_implicit_inline_templates = value;

830        break;

831 

832      case OPT_fimplicit_templates:

833        flag_implicit_templates = value;

834        break;

835 

836      case OPT_fms_extensions:

837        flag_ms_extensions = value;

838        break;

839 

840      case OPT_fnext_runtime:

841        flag_next_runtime = value;

842        break;

843 

844      case OPT_fnil_receivers:

845        flag_nil_receivers = value;

846        break;

847 

848      case OPT_fnonansi_builtins:

849        flag_no_nonansi_builtin = !value;

850        break;

851 

852      case OPT_fobjc_exceptions:

853        flag_objc_exceptions = value;

854        break;

855 

856      case OPT_foperator_names:

857        cpp_opts->operator_names = value;

858        break;

859 

860      case OPT_foptional_diags:

861        flag_optional_diags = value;

862        break;

863 

864      case OPT_fpch_deps:

865        cpp_opts->restore_pch_deps = value;

866        break;

867 

868      case OPT_fpermissive:

869        flag_permissive = value;

870        break;

871 

872      case OPT_fpreprocessed:

873        cpp_opts->preprocessed = value;

874        break;

875 

876      case OPT_freplace_objc_classes:

877        flag_replace_objc_classes = value;

878        break;

879       

880      case OPT_frepo:

881        flag_use_repository = value;

882        if (value)

883          flag_implicit_templates = 0;

884        break;

885 

886      case OPT_frtti:

887        flag_rtti = value;

888        break;

889 

890      case OPT_fshow_column:

891        cpp_opts->show_column = value;

892        break;

893 

894      case OPT_fstats:

895        flag_detailed_statistics = value;

896        break;

897 

898      case OPT_ftabstop_:

899        /* It is documented that we silently ignore silly values.  */

900        if (value >= 1 && value <= 100)

901          cpp_opts->tabstop = value;

902        break;

903 

904      case OPT_fexec_charset_:

905        cpp_opts->narrow_charset = arg;

906        break;

907 

908      case OPT_fwide_exec_charset_:

909        cpp_opts->wide_charset = arg;

910        break;

911 

912      case OPT_finput_charset_:

913        cpp_opts->input_charset = arg;

914        break;

915 

916      case OPT_ftemplate_depth_:

917        max_tinst_depth = value;

918        break;

919 

920      case OPT_fuse_cxa_atexit:

921        flag_use_cxa_atexit = value;

922        break;

923 

924      case OPT_fweak:

925        flag_weak = value;

926        break;

927 

928      case OPT_fzero_link:

929        flag_zero_link = value;

930        break;

931 

932      case OPT_gen_decls:

933        flag_gen_declaration = 1;

934        break;

935 

936      case OPT_idirafter:

937        add_path (xstrdup (arg), AFTER, 0);

938        break;

939 

940      case OPT_imacros:

941      case OPT_include:

942        defer_opt (code, arg);

943        break;

944 

945      case OPT_iprefix:

946        iprefix = arg;

947        break;

948 

949      case OPT_isysroot:

950        sysroot = arg;

951        break;

952 

953      case OPT_isystem:

954        add_path (xstrdup (arg), SYSTEM, 0);

955        break;

 

Above, flag_short_double if nonzero, means give `double' the same size as `float'.

flag_short_enums (-fshort-enums) if nonzero, means give an enum type only as many bytes as it needs.

flag_short_wchar (C, C++, -fshort-wchar) if nonzero, means give `wchar_t' the same size as `short'.

flag_signed_bitfields (C, -fsigned-bitfields), if nonzero, means to treat bitfields as signed unless they say `unsigned' (the default value is 1).

flag_signed_char (C, -fsigned-char) if nonzero, means `char' should be signed.

flag_check_new (C++, -fcheck-new) if nonzero, means want to check the return value of new and avoid calling constructors if it is a null pointer.

flag_conserve_space (C++, -fconserve-space) if nonzero, places global variables that are not initialized at compile time into the common segment (as is done in C). This reduces the size of the executable file because no space is allocated for them until the program loads. This flag no longer serves the purpose for most platforms because support has been added to store variables in BSS without making them common. Warning: If use of this option causes your program to crash when it is terminating, it could be because an object is being destroyed twice because object definitions were merged and assigned the same address.

flag_default_inline (C++, -fdefault-inline) if nonzero, means that member functions defined in class scope are inline by default (the default value is 1).

flag_elide_constructors (C++, -felide-constructor) if nonzero, the generated code that calls a function returning an object by value may be simplified by having the function construct the object directly in the specified return location instead of using a copy constructor to duplicate the one constructed inside the function. This could cause a problem if there are side effects in a constructor. (the default value is 1).

flag_enforce_eh_specs (C++, -fenforce-eh-specs) if nonzero, means to implement standard semantics for exception specifications, calling unexpected if an exception is thrown that doesn't match the specification. Zero means to treat them as assertions and optimize accordingly, but not check them (the default value is 1)

flag_new_for_scope (C++, -ffor-scope), this setting determines the scope of variables declared in the initialization section of the for statement. Specifying -ffor-scope limits the scope of the variables to the body of the loop. Specifying -fno-for-scope limits the scope of the variables from the point at which it is declared to the closing of the scope containing the for statement itself. The following example is valid with this option:

#include <stdio.h>

int main(int argc,char *argv[])

{

for(int i=0; i<10; i++) {

printf("Loop one %d/n",i);

}

printf("Out of loop %d/n",i);

return(0);

}

This is the default, for now.

flag_implement_inlines (C++, -fimplement-inlines) if nonzero, functions that are generated as inline code also have function bodies generated for them where they are defined. The option -fno-implement-inlines will suppress the generation of the function bodies for inline functions controlled by #pragma implementation. If no function body is generated, every call to it must be generated as inline code. (the default value 1).

flag_implicit_inline_templates (C++, -fimplicit-inline-templates) if nonzero, means that implicit instantiations of inline templates will be emitted if needed, even if instantiations of non-inline templates aren't (the default value is 1).

flag_implicit_templates (C++, -fimplicit-templates) if nonzero, means that implicit instantiations will be emitted if needed (the default value is 1).

flag_ms_extensions (C++, -fms-extensions) if nonzero, disables warning messages when using constructs defined in MFC, such as implicit int definition in data declarations and acquiring a pointer to a member function using nonstandard syntax.

flag_optional_diags (C++, -foptional-diags) if nonzero, means want to issue diagnostics that the standard says are not required (the default value is 1).

flag_permissive (C++, -fpermissive) if nonzero, diagnostic messages specifying that code does not conform to the standard are issued as warnings instead of errors. If nether -fpermissive nor -pedantic is specified, the -fpedantic-errors option is assumed.

flag_use_repository (C++, -frepo) if nonzero, means generate separate instantiation control files and juggle them at link time.

flag_rtti (C++, -frtti) if nonzero, means code generated for run time identification of every class containing virtual methods. If you use neither dynamic_cast nor typeid, you can save some space in each class by using -fno-rtti to supress the code generation. This flag has no effect on exception handling which generates rtti code as necessary. (the default value is 1).

flag_detailed_statistics (C++, -fstats) if nonzero, means displays statistical information about front-end processing. This information pertains to compiler internals and has no effect on its output (the default value is 0).

max_tinst_depth (C++, -ftemplate-depth-number) specifies maximum template instantiation depth. This limit is rather arbitrary, but it exists to limit the time it takes to notice infinite template instantiations (the default value is 500).

flag_use_cxa_atexit (C++, -fuse-cxa-atexit) causes global destructors to be run in the reverse order that the constructors completed instead of the reverse order that the constructors started. The order will differ only if one global constructor is invoked from inside another. This option will work only if the cxa_exit() function is part of the C runtime library.Without this option the atexit() function is used.

flag_weak (C++, -fweak) if nonzero, means want to emit defined symbols with common-like linkage as weak symbols where possible, in order to conform to C++ semantics. Otherwise, emit them as local symbols (the default value is 1).

iprefix, the prefix given by –iprefix prefix.

sysroot, the system root, if any. Overridden by –isysroot (the default value is nil).

 

c_common_handle_option (continue)

 

957       case OPT_iwithprefix:

958         add_prefixed_path (arg, SYSTEM);

959         break;

960 

961       case OPT_iwithprefixbefore:

962         add_prefixed_path (arg, BRACKET);

963         break;

964 

965       case OPT_lang_asm:

966         cpp_set_lang (parse_in, CLK_ASM);

967         cpp_opts->dollars_in_ident = false;

968         break;

969 

970       case OPT_lang_objc:

971         cpp_opts->objc = 1;

972         break;

973 

974       case OPT_nostdinc:

975         std_inc = false;

976         break;

977 

978       case OPT_nostdinc__:

979         std_cxx_inc = false;

980         break;

981 

982       case OPT_o:

983         if (!out_fname)

984           out_fname = arg;

985         else

986           error ("output filename specified twice");

987         break;

988 

989       /* We need to handle the -pedantic switches here, rather than in

990         c_common_post_options, so that a subsequent -Wno-endif-labels

991         is not overridden.  */

992       case OPT_pedantic_errors:

993         cpp_opts->pedantic_errors = 1;

994         /* Fall through.  */

995       case OPT_pedantic:

996         cpp_opts->pedantic = 1;

997         cpp_opts->warn_endif_labels = 1;

998         break;

999 

1000     case OPT_print_objc_runtime_info:

1001       print_struct_values = 1;

1002       break;

1003

1004     case OPT_remap:

1005       cpp_opts->remap = 1;

1006       break;

1007

1008     case OPT_std_c__98:

1009     case OPT_std_gnu__98:

1010       set_std_cxx98 (code == OPT_std_c__98 /* ISO */);

1011       break;

1012

1013     case OPT_std_c89:

1014     case OPT_std_iso9899_1990:

1015     case OPT_std_iso9899_199409:

1016       set_std_c89 (code == OPT_std_iso9899_199409 /* c94 */, true /* ISO */);

1017       break;

1018

1019     case OPT_std_gnu89:

1020       set_std_c89 (false /* c94 */, false /* ISO */);

1021       break;

1022

1023     case OPT_std_c99:

1024     case OPT_std_c9x:

1025     case OPT_std_iso9899_1999:

1026     case OPT_std_iso9899_199x:

1027       set_std_c99 (true /* ISO */);

1028       break;

1029

1030     case OPT_std_gnu99:

1031     case OPT_std_gnu9x:

1032       set_std_c99 (false /* ISO */);

1033       break;

1034

1035     case OPT_trigraphs:

1036       cpp_opts->trigraphs = 1;

1037       break;

1038

1039     case OPT_traditional_cpp:

1040       cpp_opts->traditional = 1;

1041       break;

1042

1043     case OPT_undef:

1044       flag_undef = 1;

1045       break;

1046

1047     case OPT_w:

1048       cpp_opts->inhibit_warnings = 1;

1049       break;

1050

1051     case OPT_v:

1052       verbose = true;

1053       break;

1054   }

1055

1056   return result;

1057 }

 

Switch –withprefix addes the directory name to the second list of directories searched for header files. The name is constructed by appending the prefix specified by -iprefix with the named directory. If no prefix has been specified on the command line prior to this option, the directory containing the installed passes of the compiler itself is used as the default.

To find a header file, GCC looks through the directories in the first list (the one that has names added to it by the -I option). If the header file is not found in the first list, the second list is searched.

And switch –iwithprefixbefore addes a name to the list of directories in the main include path. The name is constructed by appending the prefix specified by -iprefix with the named directory. If no prefix has been specified on the command line prior to this option, the directory containing the installed passes of the compiler itself is used as the default.

For these switches, add_prefixed_path is invoked. At line 1399, cpp_GCC_INCLUDE_DIR under x86/Linux target is “”, which is used when iprefix is unvailable.

 

1391 static void

1392 add_prefixed_path (const char *suffix, size_t chain)                                     in c-opts.c

1393 {

1394   char *path;

1395   const char *prefix;

1396   size_t prefix_len, suffix_len;

1397

1398   suffix_len = strlen (suffix);

1399   prefix     = iprefix ? iprefix: cpp_GCC_INCLUDE_DIR;

1400   prefix_len = iprefix? strlen (iprefix) : cpp_GCC_INCLUDE_DIR_len;

1401

1402   path = xmalloc (prefix_len + suffix_len + 1);

1403   memcpy (path, prefix, prefix_len);

1404   memcpy (path + prefix_len, suffix, suffix_len);

1405   path[prefix_len + suffix_len] = '/0';

1406

1407   add_path (path, chain, 0);

1408 }

 

Above at line 965 in c_common_handle_option, for switch –lang-asm, field dollars_in_ident, if zero means dollar signs are punctuation.

For other switches

std_inc (-nostdinc), if zero, prevents the compiler from searching for heading files in the standard system directories. The only directories searched are the current directory and those specified by the -I option.

std_cxx_inc (-nostdinc++), if zero, prevents the compiler from searching for header files in the standard C++ directories, but continues to search in the other standard directories. This option is specifically for use in compiling the C++ libraries.

out_fname (-o filename), writes the output to the named file. This applies no matter what kind of output is being generated; it could be preprocessed source, assembly language, an object file, or a linked executable. Because only one output file can be specified, the -o option should not be used if several files are being produced. If the compiler produces a linked executable and the -o option is not specified to name it, the default name is a.out.

-pedantic-errors, this option is the same as -pedantic, except the diagnostics are issued as errors instead of warnings. For C++, if neither the -fpermissive nor the -pedantic option is specified, the -fpedantic-errors option is assumed.

-pedantic, issues warnings required by strict compliance to the ISO standards for C and C++. Without this option the GNU extensions are enabled, but ISO compliant programs should compile successfully (although some may require the -ansi option). For C, the standard applied is the one specified by the -std option. If -std is used to specify gnu89, then -pedantic applies the rules for C89. The -pedantic option issues only the diagnostic messages required by the ISO standard, so it is possible for code that does not comply with the standard to compile without a warning. There are no plans for GCC to implement an option that would force strict standards compliance. For C, the -pedantic option does not apply to any expression following __extension__.

For C++, if nether the -fpermissive nor the -pedantic option is specified, the -fpedantic-errors option is assumed.

At line 1004, -remap, this option instructs the preprocessor to check for the existence of a file named header.gcc in each directory containing include files. If the file exists, it is used to determine the actual name of the file being sought. Each line of the file contains the name of the header file being sought followed by the actual file name. For example, the following lines in a header.gcc file would cause header files with long names to be found under shorter names:

NotSupportedException.h notsup.h

RollbackException.h rollbak.h

TransactionRequiredException.h transreq.h

-trigraphs, supports ISO C trigraphs. This option is implied by -ansi and by -std. With this option set, each of the three-character sequences (each beginning with ??) that make up the nine trigraphs will be translated into a single character, according to the following table:

??=  #     ??( [      ??< {

??/ /     ??) ]      ??> }

??' ^    ??! |       ??- ~

flag_undef (-undef), if nonzero, ihe preprocessor will not predefine any nonstandard macros. This option suppresses the architecture definitions such as __unix__, __OpenBSD__, __mips__, __linux__, __vax__, and so on.

-w, do not issue warning messages. Same as --no-warnings.

verbose (-v), if nonzero, displays the current version number of the compiler and displays all of the commands used to run each phase of the compile and link process. When used alone, this option will display the current version number of the compiler. When used in combination with the --help option, a complete list of the command line options is displayed.

Back to handle_option, c_common_handle_option if handles the switch successfully and completely, it will return 1, and for unrecognized switches, the result is depended upon permit_fortran_options which is decided by -traditional-cpp in c_common_init_options. Returning 0 will need be handled continually as below.

 

你可能感兴趣的:(Studying note of GCC-3.4.6 source (25 cont2))