Use of -Werror fails to change warning diagnostic into an error

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-14277
    • Hide
      ARMCLANG_3.2.3.LTS
      ARMCLANG_4.0.3.LTS
      ARMCLANG_5.0.0.LTS*
      Show
      ARMCLANG_3.2.3.LTS ARMCLANG_4.0.3.LTS ARMCLANG_5.0.0.LTS*
    • Hide
      ARMCLANG_3.2.4.LTS*
      ARMCLANG_4.0.4.LTS
      ARMCLANG_5.0.0.LTS*
      Show
      ARMCLANG_3.2.4.LTS* ARMCLANG_4.0.4.LTS ARMCLANG_5.0.0.LTS*
    • default
    • Hide
      This issue can be avoided by specifying an "implicit-function-declaration" argument to an additional -Werror option.

      For example,

      %> tiarmclang -mcpu=cortex-m4 -Werror -Werror=implicit-function-declaration -c file.c

      will generate an error diagnostic for the use of an implicit function declaration.

      Note that the second -Werror compiler option is necessary if the intention is to treat all warnings as errors, including uses of implicit function declarations.
      Show
      This issue can be avoided by specifying an "implicit-function-declaration" argument to an additional -Werror option. For example, %> tiarmclang -mcpu=cortex-m4 -Werror -Werror=implicit-function-declaration -c file.c will generate an error diagnostic for the use of an implicit function declaration. Note that the second -Werror compiler option is necessary if the intention is to treat all warnings as errors, including uses of implicit function declarations.

      % type file.c
      void fxn()
      {
          no_prototype();
      }
      
      % tiarmclang -Werror -c file.c
      file.c:3:5: warning: call to undeclared function 'no_prototype'; ISO C99 and later do not support implicit function declarations
            [-Wimplicit-function-declaration]
          no_prototype();
          ^
      1 warning generated.
      

      Because -Werror is used, the diagnostic should be an error, and not a warning.

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-5804 - Use of -Werror fails to change warn...
                SYNCHRONIZED
                • Last Sync Date: