Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-10632

Use of -save-temps causes warning diagnostic to not be emitted

    XMLWordPrintable

Details

    • Bug
    • Status: Accepted
    • Low
    • Resolution: Unresolved
    • Code Generation Tools
    • CODEGEN-9398
    • Hide
      ARMCLANG_2.1.0.LTS
      ARMCLANG_1.3.0.LTS
      ARMCLANG_2.1.3.LTS
      ARMCLANG_2.1.2.LTS
      ARMCLANG_3.1.0.STS
      Show
      ARMCLANG_2.1.0.LTS ARMCLANG_1.3.0.LTS ARMCLANG_2.1.3.LTS ARMCLANG_2.1.2.LTS ARMCLANG_3.1.0.STS
    • ARMCLANG_3.2.2.LTS*
    • default

    Description

      Please note that the -save-temps option is intended only for use in debugging an application when a developer would like to keep a compilation's intermediate file or representation that would normally be modeled as an internal data structure in the compiler.

      The compiler does not guarantee consistent diagnostic detection/reporting while using the -save-temps option.

      Original report:

      The attachment [^file.c]has these lines ...

          if (test < 10U);
          {
              func1(test);
          }

      Note the semi-colon on the first line.  While still legal C, it is probably a user error.

      Build it normally, and a warning diagnostic is emitted ...

      % tiarmclang -c file.c
      file.c:9:20: warning: if statement has empty body [-Wempty-body]
          if (test < 10U);
                         ^
      file.c:9:20: note: put the semicolon on a separate line to silence this warning
      1 warning generated.

      Add the option -save-temps and the diagnostic is not emitted ...

      % tiarmclang -c -save-temps file.c
      <nothing appears here>

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: