Page 112 - C-Language
P. 112

•  See also c99 - compile standard C programs



          GCC (GNU Compiler
                                                Description
          Collection) Flags

                                                Enables all warning messages that are commonly
          -Wall
                                                accepted to be useful.


          -Wextra                               Enables more warning messages, can be too noisy.


                                                Force warnings where code violates the chosen
          -pedantic
                                                standard.

          -Wconversion                          Enable warnings on implicit conversion, use with care.


          -c                                    Compiles source files without linking.

          -v                                    Prints compilation info.



            •  gcc accepts the POSIX flags plus a lot of others.
            •  Many other compilers on POSIX platforms (clang, vendor specific compilers) also use the
              flags that are listed above.
            •  See also Invoking GCC for many more options.


          TCC (Tiny C Compiler)
                                          Description
          Flags

          -Wimplicit-function-            Warn about implicit function declaration.
          declaration

                                          Warn about unsupported GCC features that are ignored by
          -Wunsupported
                                          TCC.

          -Wwrite-strings                 Make string constants be of type const char * instead of char *.


          -Werror                         Abort compilation if warnings are issued.


                                          Activate all warnings, except -Werror, -Wunusupported and -
          -Wall
                                          Wwrite strings.



        Examples


        The Linker


        The job of the linker is to link together a bunch of object files (.o files) into a binary executable.
        The process of linking mainly involves resolving symbolic addresses to numerical addresses. The
        result of the link process is normally an executable program.





        https://riptutorial.com/                                                                               88
   107   108   109   110   111   112   113   114   115   116   117