龙空技术网

跟老韩学Ubuntu Server 2204-gcc指令帮助手册第11小节

韩公子的Linux大集市 122

前言:

此刻看官们对“ubuntu防火墙设置防cc攻击”大体比较注意,同学们都需要了解一些“ubuntu防火墙设置防cc攻击”的相关文章。那么小编在网络上汇集了一些关于“ubuntu防火墙设置防cc攻击””的相关内容,希望看官们能喜欢,咱们一起来学习一下吧!

GCC是每个从事Linux,以及嵌入式开发等必备的编译器,由于帮助手册较多,这里使用了分页的形式进行分享,如下为Ubuntu Server 22.04操作系统平台和GCC编译器的基本信息。

老韩Linux DevOps系列

GCC帮助手册的第11小节,第2288~3288行,如下。

2288                          from 'map<[...],vector<double>>' to 'map<[...],vector<float>>2289              the -fdiagnostics-show-template-tree flag enables printing a tree-like structure showing the common and2290              differing parts of the types, such as:2291                        map<2292                          [...],2293                          vector<2294                            [double != float]>>2295              The parts that differ are highlighted with color ("double" and "float" in this case).2296          -fno-elide-type2297              By default when the C++ frontend prints diagnostics showing mismatching template types, common parts of the2298              types are printed as "[...]" to simplify the error message.  For example:2299                        could not convert 'std::map<int, std::vector<double> >()'2300                          from 'map<[...],vector<double>>' to 'map<[...],vector<float>>2301              Specifying the -fno-elide-type flag suppresses that behavior.  This flag also affects the output of the2302              -fdiagnostics-show-template-tree flag.2303          -fdiagnostics-path-format=KIND2304              Specify how to print paths of control-flow events for diagnostics that have such a path associated with2305              them.2306              KIND is none, separate-events, or inline-events, the default.2307              none means to not print diagnostic paths.2308              separate-events means to print a separate "note" diagnostic for each event within the diagnostic.  For2309              example:2310                      test.c:29:5: error: passing NULL as argument 1 to 'PyList_Append' which requires a non-NULL parameter2311                      test.c:25:10: note: (1) when 'PyList_New' fails, returning NULL2312                      test.c:27:3: note: (2) when 'i < count'2313                      test.c:29:5: note: (3) when calling 'PyList_Append', passing NULL from (1) as argument 12314              inline-events means to print the events "inline" within the source code.  This view attempts to consolidate2315              the events into runs of sufficiently-close events, printing them as labelled ranges within the source.2316              For example, the same events as above might be printed as:2317                        'test': events 1-32318                          |2319                          |   25 |   list = PyList_New(0);2320                          |      |          ^~~~~~~~~~~~~2321                          |      |          |2322                          |      |          (1) when 'PyList_New' fails, returning NULL2323                          |   26 |2324                          |   27 |   for (i = 0; i < count; i++) {2325                          |      |   ~~~2326                          |      |   |2327                          |      |   (2) when 'i < count'2328                          |   28 |     item = PyLong_FromLong(random());2329                          |   29 |     PyList_Append(list, item);2330                          |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~2331                          |      |     |2332                          |      |     (3) when calling 'PyList_Append', passing NULL from (1) as argument 12333                          |2334              Interprocedural control flow is shown by grouping the events by stack frame, and using indentation to show2335              how stack frames are nested, pushed, and popped.2336              For example:2337                        'test': events 1-22338                          |2339                          |  133 | {2340                          |      | ^2341                          |      | |2342                          |      | (1) entering 'test'2343                          |  134 |   boxed_int *obj = make_boxed_int (i);2344                          |      |                    ~~~~~~~~~~~~~~~~~~2345                          |      |                    |2346                          |      |                    (2) calling 'make_boxed_int'2347                          |2348                          +--> 'make_boxed_int': events 3-42349                                 |2350                                 |  120 | {2351                                 |      | ^2352                                 |      | |2353                                 |      | (3) entering 'make_boxed_int'2354                                 |  121 |   boxed_int *result = (boxed_int *)wrapped_malloc (sizeof (boxed_int));2355                                 |      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2356                                 |      |                                    |2357                                 |      |                                    (4) calling 'wrapped_malloc'2358                                 |2359                                 +--> 'wrapped_malloc': events 5-62360                                        |2361                                        |    7 | {2362                                        |      | ^2363                                        |      | |2364                                        |      | (5) entering 'wrapped_malloc'2365                                        |    8 |   return malloc (size);2366                                        |      |          ~~~~~~~~~~~~~2367                                        |      |          |2368                                        |      |          (6) calling 'malloc'2369                                        |2370                          <-------------+2371                          |2372                       'test': event 72373                          |2374                          |  138 |   free_boxed_int (obj);2375                          |      |   ^~~~~~~~~~~~~~~~~~~~2376                          |      |   |2377                          |      |   (7) calling 'free_boxed_int'2378                          |2379                      (etc)2380          -fdiagnostics-show-path-depths2381              This option provides additional information when printing control-flow paths associated with a diagnostic.2382              If this is option is provided then the stack depth will be printed for each run of events within2383              -fdiagnostics-path-format=separate-events.2384              This is intended for use by GCC developers and plugin developers when debugging diagnostics that report2385              interprocedural control flow.2386          -fno-show-column2387              Do not print column numbers in diagnostics.  This may be necessary if diagnostics are being scanned by a2388              program that does not understand the column numbers, such as dejagnu.2389          -fdiagnostics-column-unit=UNIT2390              Select the units for the column number.  This affects traditional diagnostics (in the absence of2391              -fno-show-column), as well as JSON format diagnostics if requested.2392              The default UNIT, display, considers the number of display columns occupied by each character.  This may be2393              larger than the number of bytes required to encode the character, in the case of tab characters, or it may2394              be smaller, in the case of multibyte characters.  For example, the character "GREEK SMALL LETTER PI2395              (U+03C0)" occupies one display column, and its UTF-8 encoding requires two bytes; the character "SLIGHTLY2396              SMILING FACE (U+1F642)" occupies two display columns, and its UTF-8 encoding requires four bytes.2397              Setting UNIT to byte changes the column number to the raw byte count in all cases, as was traditionally2398              output by GCC prior to version 11.1.0.2399          -fdiagnostics-column-origin=ORIGIN2400              Select the origin for column numbers, i.e. the column number assigned to the first column.  The default2401              value of 1 corresponds to traditional GCC behavior and to the GNU style guide.  Some utilities may perform2402              better with an origin of 0; any non-negative value may be specified.2403          -fdiagnostics-format=FORMAT2404              Select a different format for printing diagnostics.  FORMAT is text or json.  The default is text.2405              The json format consists of a top-level JSON array containing JSON objects representing the diagnostics.2406              The JSON is emitted as one line, without formatting; the examples below have been formatted for clarity.2407              Diagnostics can have child diagnostics.  For example, this error and note:2408                      misleading-indentation.c:15:3: warning: this 'if' clause does not2409                        guard... [-Wmisleading-indentation]2410                         15 |   if (flag)2411                            |   ^~2412                      misleading-indentation.c:17:5: note: ...this statement, but the latter2413                        is misleadingly indented as if it were guarded by the 'if'2414                         17 |     y = 2;2415                            |     ^2416              might be printed in JSON form (after formatting) like this:2417                      [2418                          {2419                              "kind": "warning",2420                              "locations": [2421                                  {2422                                      "caret": {2423                                          "display-column": 3,2424                                          "byte-column": 3,2425                                          "column": 3,2426                                          "file": "misleading-indentation.c",2427                                          "line": 152428                                      },2429                                      "finish": {2430                                          "display-column": 4,2431                                          "byte-column": 4,2432                                          "column": 4,2433                                          "file": "misleading-indentation.c",2434                                          "line": 152435                                      }2436                                  }2437                              ],2438                              "message": "this \u2018if\u2019 clause does not guard...",2439                              "option": "-Wmisleading-indentation",2440                              "option_url": ";,2441                              "children": [2442                                  {2443                                      "kind": "note",2444                                      "locations": [2445                                          {2446                                              "caret": {2447                                                  "display-column": 5,2448                                                  "byte-column": 5,2449                                                  "column": 5,2450                                                  "file": "misleading-indentation.c",2451                                                  "line": 172452                                              }2453                                          }2454                                      ],2455                                      "message": "...this statement, but the latter is ..."2456                                  }2457                              ]2458                              "column-origin": 1,2459                          },2460                          ...2461                      ]2462              where the "note" is a child of the "warning".2463              A diagnostic has a "kind".  If this is "warning", then there is an "option" key describing the command-line2464              option controlling the warning.2465              A diagnostic can contain zero or more locations.  Each location has an optional "label" string and up to2466              three positions within it: a "caret" position and optional "start" and "finish" positions.  A position is2467              described by a "file" name, a "line" number, and three numbers indicating a column position:2468              *   "display-column" counts display columns, accounting for tabs and multibyte characters.2469              *   "byte-column" counts raw bytes.2470              *   "column" is equal to one of the previous two, as dictated by the -fdiagnostics-column-unit option.2471              All three columns are relative to the origin specified by -fdiagnostics-column-origin, which is typically2472              equal to 1 but may be set, for instance, to 0 for compatibility with other utilities that number columns2473              from 0.  The column origin is recorded in the JSON output in the "column-origin" tag.  In the remaining2474              examples below, the extra column number outputs have been omitted for brevity.2475              For example, this error:2476                      bad-binary-ops.c:64:23: error: invalid operands to binary + (have 'S' {aka2477                         'struct s'} and 'T' {aka 'struct t'})2478                         64 |   return callee_4a () + callee_4b ();2479                            |          ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~2480                            |          |              |2481                            |          |              T {aka struct t}2482                            |          S {aka struct s}2483              has three locations.  Its primary location is at the "+" token at column 23.  It has two secondary2484              locations, describing the left and right-hand sides of the expression, which have labels.  It might be2485              printed in JSON form as:2486                          {2487                              "children": [],2488                              "kind": "error",2489                              "locations": [2490                                  {2491                                      "caret": {2492                                          "column": 23, "file": "bad-binary-ops.c", "line": 642493                                      }2494                                  },2495                                  {2496                                      "caret": {2497                                          "column": 10, "file": "bad-binary-ops.c", "line": 642498                                      },2499                                      "finish": {2500                                          "column": 21, "file": "bad-binary-ops.c", "line": 642501                                      },2502                                      "label": "S {aka struct s}"2503                                  },2504                                  {2505                                      "caret": {2506                                          "column": 25, "file": "bad-binary-ops.c", "line": 642507                                      },2508                                      "finish": {2509                                          "column": 36, "file": "bad-binary-ops.c", "line": 642510                                      },2511                                      "label": "T {aka struct t}"2512                                  }2513                              ],2514                              "message": "invalid operands to binary + ..."2515                          }2516              If a diagnostic contains fix-it hints, it has a "fixits" array, consisting of half-open intervals, similar2517              to the output of -fdiagnostics-parseable-fixits.  For example, this diagnostic with a replacement fix-it2518              hint:2519                      demo.c:8:15: error: 'struct s' has no member named 'colour'; did you2520                        mean 'color'?2521                          8 |   return ptr->colour;2522                            |               ^~~~~~2523                            |               color2524              might be printed in JSON form as:2525                          {2526                              "children": [],2527                              "fixits": [2528                                  {2529                                      "next": {2530                                          "column": 21,2531                                          "file": "demo.c",2532                                          "line": 82533                                      },2534                                      "start": {2535                                          "column": 15,2536                                          "file": "demo.c",2537                                          "line": 82538                                      },2539                                      "string": "color"2540                                  }2541                              ],2542                              "kind": "error",2543                              "locations": [2544                                  {2545                                      "caret": {2546                                          "column": 15,2547                                          "file": "demo.c",2548                                          "line": 82549                                      },2550                                      "finish": {2551                                          "column": 20,2552                                          "file": "demo.c",2553                                          "line": 82554                                      }2555                                  }2556                              ],2557                              "message": "\u2018struct s\u2019 has no member named ..."2558                          }2559              where the fix-it hint suggests replacing the text from "start" up to but not including "next" with2560              "string"'s value.  Deletions are expressed via an empty value for "string", insertions by having "start"2561              equal "next".2562              If the diagnostic has a path of control-flow events associated with it, it has a "path" array of objects2563              representing the events.  Each event object has a "description" string, a "location" object, along with a2564              "function" string and a "depth" number for representing interprocedural paths.  The "function" represents2565              the current function at that event, and the "depth" represents the stack depth relative to some baseline:2566              the higher, the more frames are within the stack.2567              For example, the intraprocedural example shown for -fdiagnostics-path-format= might have this JSON for its2568              path:2569                          "path": [2570                              {2571                                  "depth": 0,2572                                  "description": "when 'PyList_New' fails, returning NULL",2573                                  "function": "test",2574                                  "location": {2575                                      "column": 10,2576                                      "file": "test.c",2577                                      "line": 252578                                  }2579                              },2580                              {2581                                  "depth": 0,2582                                  "description": "when 'i < count'",2583                                  "function": "test",2584                                  "location": {2585                                      "column": 3,2586                                      "file": "test.c",2587                                      "line": 272588                                  }2589                              },2590                              {2591                                  "depth": 0,2592                                  "description": "when calling 'PyList_Append', passing NULL from (1) as argument 1",2593                                  "function": "test",2594                                  "location": {2595                                      "column": 5,2596                                      "file": "test.c",2597                                      "line": 292598                                  }2599                              }2600                          ]2601      Options to Request or Suppress Warnings2602          Warnings are diagnostic messages that report constructions that are not inherently erroneous but that are risky2603          or suggest there may have been an error.2604          The following language-independent options do not enable specific warnings but control the kinds of diagnostics2605          produced by GCC.2606          -fsyntax-only2607              Check the code for syntax errors, but don't do anything beyond that.2608          -fmax-errors=n2609              Limits the maximum number of error messages to n, at which point GCC bails out rather than attempting to2610              continue processing the source code.  If n is 0 (the default), there is no limit on the number of error2611              messages produced.  If -Wfatal-errors is also specified, then -Wfatal-errors takes precedence over this2612              option.2613          -w  Inhibit all warning messages.2614          -Werror2615              Make all warnings into errors.2616          -Werror=2617              Make the specified warning into an error.  The specifier for a warning is appended; for example2618              -Werror=switch turns the warnings controlled by -Wswitch into errors.  This switch takes a negative form,2619              to be used to negate -Werror for specific warnings; for example -Wno-error=switch makes -Wswitch warnings2620              not be errors, even when -Werror is in effect.2621              The warning message for each controllable warning includes the option that controls the warning.  That2622              option can then be used with -Werror= and -Wno-error= as described above.  (Printing of the option in the2623              warning message can be disabled using the -fno-diagnostics-show-option flag.)2624              Note that specifying -Werror=foo automatically implies -Wfoo.  However, -Wno-error=foo does not imply2625              anything.2626          -Wfatal-errors2627              This option causes the compiler to abort compilation on the first error occurred rather than trying to keep2628              going and printing further error messages.2629          You can request many specific warnings with options beginning with -W, for example -Wimplicit to request2630          warnings on implicit declarations.  Each of these specific warning options also has a negative form beginning2631          -Wno- to turn off warnings; for example, -Wno-implicit.  This manual lists only one of the two forms, whichever2632          is not the default.  For further language-specific options also refer to C++ Dialect Options and Objective-C2633          and Objective-C++ Dialect Options.  Additional warnings can be produced by enabling the static analyzer;2634          Some options, such as -Wall and -Wextra, turn on other options, such as -Wunused, which may turn on further2635          options, such as -Wunused-value. The combined effect of positive and negative forms is that more specific2636          options have priority over less specific ones, independently of their position in the command-line. For options2637          of the same specificity, the last one takes effect. Options enabled or disabled via pragmas take effect as if2638          they appeared at the end of the command-line.2639          When an unrecognized warning option is requested (e.g., -Wunknown-warning), GCC emits a diagnostic stating that2640          the option is not recognized.  However, if the -Wno- form is used, the behavior is slightly different: no2641          diagnostic is produced for -Wno-unknown-warning unless other diagnostics are being produced.  This allows the2642          use of new -Wno- options with old compilers, but if something goes wrong, the compiler warns that an2643          unrecognized option is present.2644          The effectiveness of some warnings depends on optimizations also being enabled. For example2645          -Wsuggest-final-types is more effective with link-time optimization and -Wmaybe-uninitialized does not warn at2646          all unless optimization is enabled.2647          -Wpedantic2648          -pedantic2649              Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden2650              extensions, and some other programs that do not follow ISO C and ISO C++.  For ISO C, follows the version2651              of the ISO C standard specified by any -std option used.2652              Valid ISO C and ISO C++ programs should compile properly with or without this option (though a rare few2653              require -ansi or a -std option specifying the required version of ISO C).  However, without this option,2654              certain GNU extensions and traditional C and C++ features are supported as well.  With this option, they2655              are rejected.2656              -Wpedantic does not cause warning messages for use of the alternate keywords whose names begin and end with2657              __.  This alternate format can also be used to disable warnings for non-ISO __intN types, i.e. __intN__.2658              Pedantic warnings are also disabled in the expression that follows "__extension__".  However, only system2659              header files should use these escape routes; application programs should avoid them.2660              Some users try to use -Wpedantic to check programs for strict ISO C conformance.  They soon find that it2661              does not do quite what they want: it finds some non-ISO practices, but not all---only those for which ISO C2662              requires a diagnostic, and some others for which diagnostics have been added.2663              A feature to report any failure to conform to ISO C might be useful in some instances, but would require2664              considerable additional work and would be quite different from -Wpedantic.  We don't have plans to support2665              such a feature in the near future.2666              Where the standard specified with -std represents a GNU extended dialect of C, such as gnu90 or gnu99,2667              there is a corresponding base standard, the version of ISO C on which the GNU extended dialect is based.2668              Warnings from -Wpedantic are given where they are required by the base standard.  (It does not make sense2669              for such warnings to be given only for features not in the specified GNU C dialect, since by definition the2670              GNU dialects of C include all features the compiler supports with the given option, and there would be2671              nothing to warn about.)2672          -pedantic-errors2673              Give an error whenever the base standard (see -Wpedantic) requires a diagnostic, in some cases where there2674              is undefined behavior at compile-time and in some other cases that do not prevent compilation of programs2675              that are valid according to the standard. This is not equivalent to -Werror=pedantic, since there are2676              errors enabled by this option and not enabled by the latter and vice versa.2677          -Wall2678              This enables all the warnings about constructions that some users consider questionable, and that are easy2679              to avoid (or modify to prevent the warning), even in conjunction with macros.  This also enables some2680              language-specific warnings described in C++ Dialect Options and Objective-C and Objective-C++ Dialect2681              Options.2682              -Wall turns on the following warning flags:2683              -Waddress -Warray-bounds=1 (only with -O2) -Warray-parameter=2 (C and Objective-C only) -Wbool-compare2684              -Wbool-operation -Wc++11-compat  -Wc++14-compat -Wcatch-value (C++ and Objective-C++ only)2685              -Wchar-subscripts -Wcomment -Wduplicate-decl-specifier (C and Objective-C only) -Wenum-compare (in C/ObjC;2686              this is on by default in C++) -Wformat -Wformat-overflow -Wformat-truncation -Wint-in-bool-context2687              -Wimplicit (C and Objective-C only) -Wimplicit-int (C and Objective-C only) -Wimplicit-function-declaration2688              (C and Objective-C only) -Winit-self (only for C++) -Wlogical-not-parentheses -Wmain (only for C/ObjC and2689              unless -ffreestanding) -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args2690              -Wmisleading-indentation (only for C/C++) -Wmissing-attributes -Wmissing-braces (only for C/ObjC)2691              -Wmultistatement-macros -Wnarrowing (only for C++) -Wnonnull -Wnonnull-compare -Wopenmp-simd -Wparentheses2692              -Wpessimizing-move (only for C++) -Wpointer-sign -Wrange-loop-construct (only for C++) -Wreorder -Wrestrict2693              -Wreturn-type -Wsequence-point -Wsign-compare (only in C++) -Wsizeof-array-div -Wsizeof-pointer-div2694              -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wtautological-compare2695              -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunused-function -Wunused-label -Wunused-value2696              -Wunused-variable -Wvla-parameter (C and Objective-C only) -Wvolatile-register-var -Wzero-length-bounds2697              Note that some warning flags are not implied by -Wall.  Some of them warn about constructions that users2698              generally do not consider questionable, but which occasionally you might wish to check for; others warn2699              about constructions that are necessary or hard to avoid in some cases, and there is no simple way to modify2700              the code to suppress the warning. Some of them are enabled by -Wextra but many of them must be enabled2701              individually.2702          -Wextra2703              This enables some extra warning flags that are not enabled by -Wall. (This option used to be called -W.2704              The older name is still supported, but the newer name is more descriptive.)2705              -Wclobbered -Wcast-function-type -Wdeprecated-copy (C++ only) -Wempty-body -Wenum-conversion (C only)2706              -Wignored-qualifiers -Wimplicit-fallthrough=3 -Wmissing-field-initializers -Wmissing-parameter-type (C2707              only) -Wold-style-declaration (C only) -Woverride-init -Wsign-compare (C only) -Wstring-compare2708              -Wredundant-move (only for C++) -Wtype-limits -Wuninitialized -Wshift-negative-value (in C++11 to C++17 and2709              in C99 and newer) -Wunused-parameter (only with -Wunused or -Wall) -Wunused-but-set-parameter (only with2710              -Wunused or -Wall)2711              The option -Wextra also prints warning messages for the following cases:2712              *   A pointer is compared against integer zero with "<", "<=", ">", or ">=".2713              *   (C++ only) An enumerator and a non-enumerator both appear in a conditional expression.2714              *   (C++ only) Ambiguous virtual bases.2715              *   (C++ only) Subscripting an array that has been declared "register".2716              *   (C++ only) Taking the address of a variable that has been declared "register".2717              *   (C++ only) A base class is not initialized in the copy constructor of a derived class.2718          -Wabi (C, Objective-C, C++ and Objective-C++ only)2719              Warn about code affected by ABI changes.  This includes code that may not be compatible with the vendor-2720              neutral C++ ABI as well as the psABI for the particular target.2721              Since G++ now defaults to updating the ABI with each major release, normally -Wabi warns only about C++ ABI2722              compatibility problems if there is a check added later in a release series for an ABI issue discovered2723              since the initial release.  -Wabi warns about more things if an older ABI version is selected (with2724              -fabi-version=n).2725              -Wabi can also be used with an explicit version number to warn about C++ ABI compatibility with a2726              particular -fabi-version level, e.g. -Wabi=2 to warn about changes relative to -fabi-version=2.2727              If an explicit version number is provided and -fabi-compat-version is not specified, the version number2728              from this option is used for compatibility aliases.  If no explicit version number is provided with this2729              option, but -fabi-compat-version is specified, that version number is used for C++ ABI warnings.2730              Although an effort has been made to warn about all such cases, there are probably some cases that are not2731              warned about, even though G++ is generating incompatible code.  There may also be cases where warnings are2732              emitted even though the code that is generated is compatible.2733              You should rewrite your code to avoid these warnings if you are concerned about the fact that code2734              generated by G++ may not be binary compatible with code generated by other compilers.2735              Known incompatibilities in -fabi-version=2 (which was the default from GCC 3.4 to 4.9) include:2736              *   A template with a non-type template parameter of reference type was mangled incorrectly:2737                          extern int N;2738                          template <int &> struct S {};2739                          void n (S<N>) {2}2740                  This was fixed in -fabi-version=3.2741              *   SIMD vector types declared using "__attribute ((vector_size))" were mangled in a non-standard way that2742                  does not allow for overloading of functions taking vectors of different sizes.2743                  The mangling was changed in -fabi-version=4.2744              *   "__attribute ((const))" and "noreturn" were mangled as type qualifiers, and "decltype" of a plain2745                  declaration was folded away.2746                  These mangling issues were fixed in -fabi-version=5.2747              *   Scoped enumerators passed as arguments to a variadic function are promoted like unscoped enumerators,2748                  causing "va_arg" to complain.  On most targets this does not actually affect the parameter passing ABI,2749                  as there is no way to pass an argument smaller than "int".2750                  Also, the ABI changed the mangling of template argument packs, "const_cast", "static_cast", prefix2751                  increment/decrement, and a class scope function used as a template argument.2752                  These issues were corrected in -fabi-version=6.2753              *   Lambdas in default argument scope were mangled incorrectly, and the ABI changed the mangling of2754                  "nullptr_t".2755                  These issues were corrected in -fabi-version=7.2756              *   When mangling a function type with function-cv-qualifiers, the un-qualified function type was2757                  incorrectly treated as a substitution candidate.2758                  This was fixed in -fabi-version=8, the default for GCC 5.1.2759              *   "decltype(nullptr)" incorrectly had an alignment of 1, leading to unaligned accesses.  Note that this2760                  did not affect the ABI of a function with a "nullptr_t" parameter, as parameters have a minimum2761                  alignment.2762                  This was fixed in -fabi-version=9, the default for GCC 5.2.2763              *   Target-specific attributes that affect the identity of a type, such as ia32 calling conventions on a2764                  function type (stdcall, regparm, etc.), did not affect the mangled name, leading to name collisions2765                  when function pointers were used as template arguments.2766                  This was fixed in -fabi-version=10, the default for GCC 6.1.2767              This option also enables warnings about psABI-related changes.  The known psABI changes at this point2768              include:2769              *   For SysV/x86-64, unions with "long double" members are passed in memory as specified in psABI.  Prior2770                  to GCC 4.4, this was not the case.  For example:2771                          union U {2772                            long double ld;2773                            int i;2774                          };2775                  "union U" is now always passed in memory.2776          -Wchar-subscripts2777              Warn if an array subscript has type "char".  This is a common cause of error, as programmers often forget2778              that this type is signed on some machines.  This warning is enabled by -Wall.2779          -Wno-coverage-mismatch2780              Warn if feedback profiles do not match when using the -fprofile-use option.  If a source file is changed2781              between compiling with -fprofile-generate and with -fprofile-use, the files with the profile feedback can2782              fail to match the source file and GCC cannot use the profile feedback information.  By default, this2783              warning is enabled and is treated as an error.  -Wno-coverage-mismatch can be used to disable the warning2784              or -Wno-error=coverage-mismatch can be used to disable the error.  Disabling the error for this warning can2785              result in poorly optimized code and is useful only in the case of very minor changes such as bug fixes to2786              an existing code-base.  Completely disabling the warning is not recommended.2787          -Wno-cpp2788              (C, Objective-C, C++, Objective-C++ and Fortran only) Suppress warning messages emitted by "#warning"2789              directives.2790          -Wdouble-promotion (C, C++, Objective-C and Objective-C++ only)2791              Give a warning when a value of type "float" is implicitly promoted to "double".  CPUs with a 32-bit2792              "single-precision" floating-point unit implement "float" in hardware, but emulate "double" in software.  On2793              such a machine, doing computations using "double" values is much more expensive because of the overhead2794              required for software emulation.2795              It is easy to accidentally do computations with "double" because floating-point literals are implicitly of2796              type "double".  For example, in:2797                      float area(float radius)2798                      {2799                         return 3.14159 * radius * radius;2800                      }2801              the compiler performs the entire computation with "double" because the floating-point literal is a2802              "double".2803          -Wduplicate-decl-specifier (C and Objective-C only)2804              Warn if a declaration has duplicate "const", "volatile", "restrict" or "_Atomic" specifier.  This warning2805              is enabled by -Wall.2806          -Wformat2807          -Wformat=n2808              Check calls to "printf" and "scanf", etc., to make sure that the arguments supplied have types appropriate2809              to the format string specified, and that the conversions specified in the format string make sense.  This2810              includes standard functions, and others specified by format attributes, in the "printf", "scanf",2811              "strftime" and "strfmon" (an X/Open extension, not in the C standard) families (or other target-specific2812              families).  Which functions are checked without format attributes having been specified depends on the2813              standard version selected, and such checks of functions without the attribute specified are disabled by2814              -ffreestanding or -fno-builtin.2815              The formats are checked against the format features supported by GNU libc version 2.2.  These include all2816              ISO C90 and C99 features, as well as features from the Single Unix Specification and some BSD and GNU2817              extensions.  Other library implementations may not support all these features; GCC does not support warning2818              about features that go beyond a particular library's limitations.  However, if -Wpedantic is used with2819              -Wformat, warnings are given about format features not in the selected standard version (but not for2820              "strfmon" formats, since those are not in any version of the C standard).2821              -Wformat=12822              -Wformat2823                  Option -Wformat is equivalent to -Wformat=1, and -Wno-format is equivalent to -Wformat=0.  Since2824                  -Wformat also checks for null format arguments for several functions, -Wformat also implies -Wnonnull.2825                  Some aspects of this level of format checking can be disabled by the options: -Wno-format-contains-nul,2826                  -Wno-format-extra-args, and -Wno-format-zero-length.  -Wformat is enabled by -Wall.2827              -Wformat=22828                  Enable -Wformat plus additional format checks.  Currently equivalent to -Wformat -Wformat-nonliteral2829                  -Wformat-security -Wformat-y2k.2830          -Wno-format-contains-nul2831              If -Wformat is specified, do not warn about format strings that contain NUL bytes.2832          -Wno-format-extra-args2833              If -Wformat is specified, do not warn about excess arguments to a "printf" or "scanf" format function.  The2834              C standard specifies that such arguments are ignored.2835              Where the unused arguments lie between used arguments that are specified with $ operand number2836              specifications, normally warnings are still given, since the implementation could not know what type to2837              pass to "va_arg" to skip the unused arguments.  However, in the case of "scanf" formats, this option2838              suppresses the warning if the unused arguments are all pointers, since the Single Unix Specification says2839              that such unused arguments are allowed.2840          -Wformat-overflow2841          -Wformat-overflow=level2842              Warn about calls to formatted input/output functions such as "sprintf" and "vsprintf" that might overflow2843              the destination buffer.  When the exact number of bytes written by a format directive cannot be determined2844              at compile-time it is estimated based on heuristics that depend on the level argument and on optimization.2845              While enabling optimization will in most cases improve the accuracy of the warning, it may also result in2846              false positives.2847              -Wformat-overflow2848              -Wformat-overflow=12849                  Level 1 of -Wformat-overflow enabled by -Wformat employs a conservative approach that warns only about2850                  calls that most likely overflow the buffer.  At this level, numeric arguments to format directives with2851                  unknown values are assumed to have the value of one, and strings of unknown length to be empty.2852                  Numeric arguments that are known to be bounded to a subrange of their type, or string arguments whose2853                  output is bounded either by their directive's precision or by a finite set of string literals, are2854                  assumed to take on the value within the range that results in the most bytes on output.  For example,2855                  the call to "sprintf" below is diagnosed because even with both a and b equal to zero, the terminating2856                  NUL character ('\0') appended by the function to the destination buffer will be written past its end.2857                  Increasing the size of the buffer by a single byte is sufficient to avoid the warning, though it may2858                  not be sufficient to avoid the overflow.2859                          void f (int a, int b)2860                          {2861                            char buf [13];2862                            sprintf (buf, "a = %i, b = %i\n", a, b);2863                          }2864              -Wformat-overflow=22865                  Level 2 warns also about calls that might overflow the destination buffer given an argument of2866                  sufficient length or magnitude.  At level 2, unknown numeric arguments are assumed to have the minimum2867                  representable value for signed types with a precision greater than 1, and the maximum representable2868                  value otherwise.  Unknown string arguments whose length cannot be assumed to be bounded either by the2869                  directive's precision, or by a finite set of string literals they may evaluate to, or the character2870                  array they may point to, are assumed to be 1 character long.2871                  At level 2, the call in the example above is again diagnosed, but this time because with a equal to a2872                  32-bit "INT_MIN" the first %i directive will write some of its digits beyond the end of the destination2873                  buffer.  To make the call safe regardless of the values of the two variables, the size of the2874                  destination buffer must be increased to at least 34 bytes.  GCC includes the minimum size of the buffer2875                  in an informational note following the warning.2876                  An alternative to increasing the size of the destination buffer is to constrain the range of formatted2877                  values.  The maximum length of string arguments can be bounded by specifying the precision in the2878                  format directive.  When numeric arguments of format directives can be assumed to be bounded by less2879                  than the precision of their type, choosing an appropriate length modifier to the format specifier will2880                  reduce the required buffer size.  For example, if a and b in the example above can be assumed to be2881                  within the precision of the "short int" type then using either the %hi format directive or casting the2882                  argument to "short" reduces the maximum required size of the buffer to 24 bytes.2883                          void f (int a, int b)2884                          {2885                            char buf [23];2886                            sprintf (buf, "a = %hi, b = %i\n", a, (short)b);2887                          }2888          -Wno-format-zero-length2889              If -Wformat is specified, do not warn about zero-length formats.  The C standard specifies that zero-length2890              formats are allowed.2891          -Wformat-nonliteral2892              If -Wformat is specified, also warn if the format string is not a string literal and so cannot be checked,2893              unless the format function takes its format arguments as a "va_list".2894          -Wformat-security2895              If -Wformat is specified, also warn about uses of format functions that represent possible security2896              problems.  At present, this warns about calls to "printf" and "scanf" functions where the format string is2897              not a string literal and there are no format arguments, as in "printf (foo);".  This may be a security hole2898              if the format string came from untrusted input and contains %n.  (This is currently a subset of what2899              -Wformat-nonliteral warns about, but in future warnings may be added to -Wformat-security that are not2900              included in -Wformat-nonliteral.)2901          -Wformat-signedness2902              If -Wformat is specified, also warn if the format string requires an unsigned argument and the argument is2903              signed and vice versa.2904          -Wformat-truncation2905          -Wformat-truncation=level2906              Warn about calls to formatted input/output functions such as "snprintf" and "vsnprintf" that might result2907              in output truncation.  When the exact number of bytes written by a format directive cannot be determined at2908              compile-time it is estimated based on heuristics that depend on the level argument and on optimization.2909              While enabling optimization will in most cases improve the accuracy of the warning, it may also result in2910              false positives.  Except as noted otherwise, the option uses the same logic -Wformat-overflow.2911              -Wformat-truncation2912              -Wformat-truncation=12913                  Level 1 of -Wformat-truncation enabled by -Wformat employs a conservative approach that warns only2914                  about calls to bounded functions whose return value is unused and that will most likely result in2915                  output truncation.2916              -Wformat-truncation=22917                  Level 2 warns also about calls to bounded functions whose return value is used and that might result in2918                  truncation given an argument of sufficient length or magnitude.2919          -Wformat-y2k2920              If -Wformat is specified, also warn about "strftime" formats that may yield only a two-digit year.2921          -Wnonnull2922              Warn about passing a null pointer for arguments marked as requiring a non-null value by the "nonnull"2923              function attribute.2924              -Wnonnull is included in -Wall and -Wformat.  It can be disabled with the -Wno-nonnull option.2925          -Wnonnull-compare2926              Warn when comparing an argument marked with the "nonnull" function attribute against null inside the2927              function.2928              -Wnonnull-compare is included in -Wall.  It can be disabled with the -Wno-nonnull-compare option.2929          -Wnull-dereference2930              Warn if the compiler detects paths that trigger erroneous or undefined behavior due to dereferencing a null2931              pointer.  This option is only active when -fdelete-null-pointer-checks is active, which is enabled by2932              optimizations in most targets.  The precision of the warnings depends on the optimization options used.2933          -Winit-self (C, C++, Objective-C and Objective-C++ only)2934              Warn about uninitialized variables that are initialized with themselves.  Note this option can only be used2935              with the -Wuninitialized option.2936              For example, GCC warns about "i" being uninitialized in the following snippet only when -Winit-self has2937              been specified:2938                      int f()2939                      {2940                        int i = i;2941                        return i;2942                      }2943              This warning is enabled by -Wall in C++.2944          -Wno-implicit-int (C and Objective-C only)2945              This option controls warnings when a declaration does not specify a type.  This warning is enabled by2946              default in C99 and later dialects of C, and also by -Wall.2947          -Wno-implicit-function-declaration (C and Objective-C only)2948              This option controls warnings when a function is used before being declared.  This warning is enabled by2949              default in C99 and later dialects of C, and also by -Wall.  The warning is made into an error by2950              -pedantic-errors.2951          -Wimplicit (C and Objective-C only)2952              Same as -Wimplicit-int and -Wimplicit-function-declaration.  This warning is enabled by -Wall.2953          -Wimplicit-fallthrough2954              -Wimplicit-fallthrough is the same as -Wimplicit-fallthrough=3 and -Wno-implicit-fallthrough is the same as2955              -Wimplicit-fallthrough=0.2956          -Wimplicit-fallthrough=n2957              Warn when a switch case falls through.  For example:2958                      switch (cond)2959                        {2960                        case 1:2961                          a = 1;2962                          break;2963                        case 2:2964                          a = 2;2965                        case 3:2966                          a = 3;2967                          break;2968                        }2969              This warning does not warn when the last statement of a case cannot fall through, e.g. when there is a2970              return statement or a call to function declared with the noreturn attribute.  -Wimplicit-fallthrough= also2971              takes into account control flow statements, such as ifs, and only warns when appropriate.  E.g.2972                      switch (cond)2973                        {2974                        case 1:2975                          if (i > 3) {2976                            bar (5);2977                            break;2978                          } else if (i < 1) {2979                            bar (0);2980                          } else2981                            return;2982                        default:2983                          ...2984                        }2985              Since there are occasions where a switch case fall through is desirable, GCC provides an attribute,2986              "__attribute__ ((fallthrough))", that is to be used along with a null statement to suppress this warning2987              that would normally occur:2988                      switch (cond)2989                        {2990                        case 1:2991                          bar (0);2992                          __attribute__ ((fallthrough));2993                        default:2994                          ...2995                        }2996              C++17 provides a standard way to suppress the -Wimplicit-fallthrough warning using "[[fallthrough]];"2997              instead of the GNU attribute.  In C++11 or C++14 users can use "[[gnu::fallthrough]];", which is a GNU2998              extension.  Instead of these attributes, it is also possible to add a fallthrough comment to silence the2999              warning.  The whole body of the C or C++ style comment should match the given regular expressions listed3000              below.  The option argument n specifies what kind of comments are accepted:3001              *<-Wimplicit-fallthrough=0 disables the warning altogether.>3002              *<-Wimplicit-fallthrough=1 matches ".*" regular>3003                  expression, any comment is used as fallthrough comment.3004              *<-Wimplicit-fallthrough=2 case insensitively matches>3005                  ".*falls?[ \t-]*thr(ough|u).*" regular expression.3006              *<-Wimplicit-fallthrough=3 case sensitively matches one of the>3007                  following regular expressions:3008                  *<"-fallthrough">3009                  *<"@fallthrough@">3010                  *<"lint -fallthrough[ \t]*">3011                  *<"[ \t.!]*(ELSE,? |INTENTIONAL(LY)? )?FALL(S | |-)?THR(OUGH|U)[ \t.!]*(-[^\n\r]*)?">3012                  *<"[ \t.!]*(Else,? |Intentional(ly)? )?Fall((s | |-)[Tt]|t)hr(ough|u)[ \t.!]*(-[^\n\r]*)?">3013                  *<"[ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?">3014              *<-Wimplicit-fallthrough=4 case sensitively matches one of the>3015                  following regular expressions:3016                  *<"-fallthrough">3017                  *<"@fallthrough@">3018                  *<"lint -fallthrough[ \t]*">3019                  *<"[ \t]*FALLTHR(OUGH|U)[ \t]*">3020              *<-Wimplicit-fallthrough=5 doesn't recognize any comments as>3021                  fallthrough comments, only attributes disable the warning.3022              The comment needs to be followed after optional whitespace and other comments by "case" or "default"3023              keywords or by a user label that precedes some "case" or "default" label.3024                      switch (cond)3025                        {3026                        case 1:3027                          bar (0);3028                          /* FALLTHRU */3029                        default:3030                          ...3031                        }3032              The -Wimplicit-fallthrough=3 warning is enabled by -Wextra.3033          -Wno-if-not-aligned (C, C++, Objective-C and Objective-C++ only)3034              Control if warnings triggered by the "warn_if_not_aligned" attribute should be issued.  These warnings are3035              enabled by default.3036          -Wignored-qualifiers (C and C++ only)3037              Warn if the return type of a function has a type qualifier such as "const".  For ISO C such a type3038              qualifier has no effect, since the value returned by a function is not an lvalue.  For C++, the warning is3039              only emitted for scalar types or "void".  ISO C prohibits qualified "void" return types on function3040              definitions, so such return types always receive a warning even without this option.3041              This warning is also enabled by -Wextra.3042          -Wno-ignored-attributes (C and C++ only)3043              This option controls warnings when an attribute is ignored.  This is different from the -Wattributes option3044              in that it warns whenever the compiler decides to drop an attribute, not that the attribute is either3045              unknown, used in a wrong place, etc.  This warning is enabled by default.3046          -Wmain3047              Warn if the type of "main" is suspicious.  "main" should be a function with external linkage, returning3048              int, taking either zero arguments, two, or three arguments of appropriate types.  This warning is enabled3049              by default in C++ and is enabled by either -Wall or -Wpedantic.3050          -Wmisleading-indentation (C and C++ only)3051              Warn when the indentation of the code does not reflect the block structure.  Specifically, a warning is3052              issued for "if", "else", "while", and "for" clauses with a guarded statement that does not use braces,3053              followed by an unguarded statement with the same indentation.3054              In the following example, the call to "bar" is misleadingly indented as if it were guarded by the "if"3055              conditional.3056                        if (some_condition ())3057                          foo ();3058                          bar ();  /* Gotcha: this is not guarded by the "if".  */3059              In the case of mixed tabs and spaces, the warning uses the -ftabstop= option to determine if the statements3060              line up (defaulting to 8).3061              The warning is not issued for code involving multiline preprocessor logic such as the following example.3062                        if (flagA)3063                          foo (0);3064                      #if SOME_CONDITION_THAT_DOES_NOT_HOLD3065                        if (flagB)3066                      #endif3067                          foo (1);3068              The warning is not issued after a "#line" directive, since this typically indicates autogenerated code, and3069              no assumptions can be made about the layout of the file that the directive references.3070              This warning is enabled by -Wall in C and C++.3071          -Wmissing-attributes3072              Warn when a declaration of a function is missing one or more attributes that a related function is declared3073              with and whose absence may adversely affect the correctness or efficiency of generated code.  For example,3074              the warning is issued for declarations of aliases that use attributes to specify less restrictive3075              requirements than those of their targets.  This typically represents a potential optimization opportunity.3076              By contrast, the -Wattribute-alias=2 option controls warnings issued when the alias is more restrictive3077              than the target, which could lead to incorrect code generation.  Attributes considered include3078              "alloc_align", "alloc_size", "cold", "const", "hot", "leaf", "malloc", "nonnull", "noreturn", "nothrow",3079              "pure", "returns_nonnull", and "returns_twice".3080              In C++, the warning is issued when an explicit specialization of a primary template declared with attribute3081              "alloc_align", "alloc_size", "assume_aligned", "format", "format_arg", "malloc", or "nonnull" is declared3082              without it.  Attributes "deprecated", "error", and "warning" suppress the warning..3083              You can use the "copy" attribute to apply the same set of attributes to a declaration as that on another3084              declaration without explicitly enumerating the attributes. This attribute can be applied to declarations of3085              functions, variables, or types.3086              -Wmissing-attributes is enabled by -Wall.3087              For example, since the declaration of the primary function template below makes use of both attribute3088              "malloc" and "alloc_size" the declaration of the explicit specialization of the template is diagnosed3089              because it is missing one of the attributes.3090                      template <class T>3091                      T* __attribute__ ((malloc, alloc_size (1)))3092                      allocate (size_t);3093                      template <>3094                      void* __attribute__ ((malloc))   // missing alloc_size3095                      allocate<void> (size_t);3096          -Wmissing-braces3097              Warn if an aggregate or union initializer is not fully bracketed.  In the following example, the3098              initializer for "a" is not fully bracketed, but that for "b" is fully bracketed.3099                      int a[2][2] = { 0, 1, 2, 3 };3100                      int b[2][2] = { { 0, 1 }, { 2, 3 } };3101              This warning is enabled by -Wall.3102          -Wmissing-include-dirs (C, C++, Objective-C and Objective-C++ only)3103              Warn if a user-supplied include directory does not exist.3104          -Wno-missing-profile3105              This option controls warnings if feedback profiles are missing when using the -fprofile-use option.  This3106              option diagnoses those cases where a new function or a new file is added between compiling with3107              -fprofile-generate and with -fprofile-use, without regenerating the profiles.  In these cases, the profile3108              feedback data files do not contain any profile feedback information for the newly added function or file3109              respectively.  Also, in the case when profile count data (.gcda) files are removed, GCC cannot use any3110              profile feedback information.  In all these cases, warnings are issued to inform you that a profile3111              generation step is due.  Ignoring the warning can result in poorly optimized code.  -Wno-missing-profile3112              can be used to disable the warning, but this is not recommended and should be done only when non-existent3113              profile data is justified.3114          -Wno-mismatched-dealloc3115              Warn for calls to deallocation functions with pointer arguments returned from from allocations functions3116              for which the former isn't a suitable deallocator.  A pair of functions can be associated as matching3117              allocators and deallocators by use of attribute "malloc".  Unless disabled by the -fno-builtin option the3118              standard functions "calloc", "malloc", "realloc", and "free", as well as the corresponding forms of C++3119              "operator new" and "operator delete" are implicitly associated as matching allocators and deallocators.  In3120              the following example "mydealloc" is the deallocator for pointers returned from "myalloc".3121                      void mydealloc (void*);3122                      __attribute__ ((malloc (mydealloc, 1))) void*3123                      myalloc (size_t);3124                      void f (void)3125                      {3126                        void *p = myalloc (32);3127                        // ...use p...3128                        free (p);   // warning: not a matching deallocator for myalloc3129                        mydealloc (p);   // ok3130                      }3131              In C++, the related option -Wmismatched-new-delete diagnoses mismatches involving either "operator new" or3132              "operator delete".3133              Option -Wmismatched-dealloc is enabled by default.3134          -Wmultistatement-macros3135              Warn about unsafe multiple statement macros that appear to be guarded by a clause such as "if", "else",3136              "for", "switch", or "while", in which only the first statement is actually guarded after the macro is3137              expanded.3138              For example:3139                      #define DOIT x++; y++3140                      if (c)3141                        DOIT;3142              will increment "y" unconditionally, not just when "c" holds.  The can usually be fixed by wrapping the3143              macro in a do-while loop:3144                      #define DOIT do { x++; y++; } while (0)3145                      if (c)3146                        DOIT;3147              This warning is enabled by -Wall in C and C++.3148          -Wparentheses3149              Warn if parentheses are omitted in certain contexts, such as when there is an assignment in a context where3150              a truth value is expected, or when operators are nested whose precedence people often get confused about.3151              Also warn if a comparison like "x<=y<=z" appears; this is equivalent to "(x<=y ? 1 : 0) <= z", which is a3152              different interpretation from that of ordinary mathematical notation.3153              Also warn for dangerous uses of the GNU extension to "?:" with omitted middle operand. When the condition3154              in the "?": operator is a boolean expression, the omitted value is always 1.  Often programmers expect it3155              to be a value computed inside the conditional expression instead.3156              For C++ this also warns for some cases of unnecessary parentheses in declarations, which can indicate an3157              attempt at a function call instead of a declaration:3158                      {3159                        // Declares a local variable called mymutex.3160                        std::unique_lock<std::mutex> (mymutex);3161                        // User meant std::unique_lock<std::mutex> lock (mymutex);3162                      }3163              This warning is enabled by -Wall.3164          -Wsequence-point3165              Warn about code that may have undefined semantics because of violations of sequence point rules in the C3166              and C++ standards.3167              The C and C++ standards define the order in which expressions in a C/C++ program are evaluated in terms of3168              sequence points, which represent a partial ordering between the execution of parts of the program: those3169              executed before the sequence point, and those executed after it.  These occur after the evaluation of a3170              full expression (one which is not part of a larger expression), after the evaluation of the first operand3171              of a "&&", "||", "? :" or "," (comma) operator, before a function is called (but after the evaluation of3172              its arguments and the expression denoting the called function), and in certain other places.  Other than as3173              expressed by the sequence point rules, the order of evaluation of subexpressions of an expression is not3174              specified.  All these rules describe only a partial order rather than a total order, since, for example, if3175              two functions are called within one expression with no sequence point between them, the order in which the3176              functions are called is not specified.  However, the standards committee have ruled that function calls do3177              not overlap.3178              It is not specified when between sequence points modifications to the values of objects take effect.3179              Programs whose behavior depends on this have undefined behavior; the C and C++ standards specify that3180              "Between the previous and next sequence point an object shall have its stored value modified at most once3181              by the evaluation of an expression.  Furthermore, the prior value shall be read only to determine the value3182              to be stored.".  If a program breaks these rules, the results on any particular implementation are entirely3183              unpredictable.3184              Examples of code with undefined behavior are "a = a++;", "a[n] = b[n++]" and "a[i++] = i;".  Some more3185              complicated cases are not diagnosed by this option, and it may give an occasional false positive result,3186              but in general it has been found fairly effective at detecting this sort of problem in programs.3187              The C++17 standard will define the order of evaluation of operands in more cases: in particular it requires3188              that the right-hand side of an assignment be evaluated before the left-hand side, so the above examples are3189              no longer undefined.  But this option will still warn about them, to help people avoid writing code that is3190              undefined in C and earlier revisions of C++.3191              The standard is worded confusingly, therefore there is some debate over the precise meaning of the sequence3192              point rules in subtle cases.  Links to discussions of the problem, including proposed formal definitions,3193              may be found on the GCC readings page, at <;.3194              This warning is enabled by -Wall for C and C++.3195          -Wno-return-local-addr3196              Do not warn about returning a pointer (or in C++, a reference) to a variable that goes out of scope after3197              the function returns.3198          -Wreturn-type3199              Warn whenever a function is defined with a return type that defaults to "int".  Also warn about any3200              "return" statement with no return value in a function whose return type is not "void" (falling off the end3201              of the function body is considered returning without a value).3202              For C only, warn about a "return" statement with an expression in a function whose return type is "void",3203              unless the expression type is also "void".  As a GNU extension, the latter case is accepted without a3204              warning unless -Wpedantic is used.  Attempting to use the return value of a non-"void" function other than3205              "main" that flows off the end by reaching the closing curly brace that terminates the function is3206              undefined.3207              Unlike in C, in C++, flowing off the end of a non-"void" function other than "main" results in undefined3208              behavior even when the value of the function is not used.3209              This warning is enabled by default in C++ and by -Wall otherwise.3210          -Wno-shift-count-negative3211              Controls warnings if a shift count is negative.  This warning is enabled by default.3212          -Wno-shift-count-overflow3213              Controls warnings if a shift count is greater than or equal to the bit width of the type.  This warning is3214              enabled by default.3215          -Wshift-negative-value3216              Warn if left shifting a negative value.  This warning is enabled by -Wextra in C99 (and newer) and C++11 to3217              C++17 modes.3218          -Wno-shift-overflow3219          -Wshift-overflow=n3220              These options control warnings about left shift overflows.3221              -Wshift-overflow=13222                  This is the warning level of -Wshift-overflow and is enabled by default in C99 and C++11 modes (and3223                  newer).  This warning level does not warn about left-shifting 1 into the sign bit.  (However, in C,3224                  such an overflow is still rejected in contexts where an integer constant expression is required.)  No3225                  warning is emitted in C++20 mode (and newer), as signed left shifts always wrap.3226              -Wshift-overflow=23227                  This warning level also warns about left-shifting 1 into the sign bit, unless C++14 mode (or newer) is3228                  active.3229          -Wswitch3230              Warn whenever a "switch" statement has an index of enumerated type and lacks a "case" for one or more of3231              the named codes of that enumeration.  (The presence of a "default" label prevents this warning.)  "case"3232              labels outside the enumeration range also provoke warnings when this option is used (even if there is a3233              "default" label).  This warning is enabled by -Wall.3234          -Wswitch-default3235              Warn whenever a "switch" statement does not have a "default" case.3236          -Wswitch-enum3237              Warn whenever a "switch" statement has an index of enumerated type and lacks a "case" for one or more of3238              the named codes of that enumeration.  "case" labels outside the enumeration range also provoke warnings3239              when this option is used.  The only difference between -Wswitch and this option is that this option gives a3240              warning about an omitted enumeration code even if there is a "default" label.3241          -Wno-switch-bool3242              Do not warn when a "switch" statement has an index of boolean type and the case values are outside the3243              range of a boolean type.  It is possible to suppress this warning by casting the controlling expression to3244              a type other than "bool".  For example:3245                      switch ((int) (a == 4))3246                        {3247                        ...3248                        }3249              This warning is enabled by default for C and C++ programs.3250          -Wno-switch-outside-range3251              This option controls warnings when a "switch" case has a value that is outside of its respective type3252              range.  This warning is enabled by default for C and C++ programs.3253          -Wno-switch-unreachable3254              Do not warn when a "switch" statement contains statements between the controlling expression and the first3255              case label, which will never be executed.  For example:3256                      switch (cond)3257                        {3258                         i = 15;3259                        ...3260                         case 5:3261                        ...3262                        }3263              -Wswitch-unreachable does not warn if the statement between the controlling expression and the first case3264              label is just a declaration:3265                      switch (cond)3266                        {3267                         int i;3268                        ...3269                         case 5:3270                         i = 5;3271                        ...3272                        }3273              This warning is enabled by default for C and C++ programs.3274          -Wsync-nand (C and C++ only)3275              Warn when "__sync_fetch_and_nand" and "__sync_nand_and_fetch" built-in functions are used.  These functions3276              changed semantics in GCC 4.4.3277          -Wunused-but-set-parameter3278              Warn whenever a function parameter is assigned to, but otherwise unused (aside from its declaration).3279              To suppress this warning use the "unused" attribute.3280              This warning is also enabled by -Wunused together with -Wextra.3281          -Wunused-but-set-variable3282              Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration).  This3283              warning is enabled by -Wall.3284              To suppress this warning use the "unused" attribute.3285              This warning is also enabled by -Wunused, which is enabled by -Wall.3286          -Wunused-function3287              Warn whenever a static function is declared but not defined or a non-inline static function is unused.3288              This warning is enabled by -Wall.

标签: #ubuntu防火墙设置防cc攻击