How specify Warning level

Help
Paul Brown
2004-06-16
2004-06-16
  • Paul Brown
    Paul Brown
    2004-06-16

    Hi
    i'm using 'gcc' on Linux/I386 to build and i'm getting numerous warnings out of the compiler. the <cc> task is showing them as [ERROR]'s and my build is subsequently failing.

    Is there some way to set the Warning level that the <cc> task will ignore errors until.

    Thanks
    Paul

     
    • Curt Arnold
      Curt Arnold
      2004-06-16

      Warnings can be controlled by the specifying a warnings attribute on either a cc or compiler element.   One of the options, warnings="aserror" would give the behavior that you described where warnings are promoted as errors, but it is not the default.  The other values for warnings are none, severe (meaning display severe only), default, production, and diagnostic.

      If you want to compile as many files as possible and not stop at the first error, you can specify relentless="true".  The task will still fail, but after attempting all pending compilations.

      There is not currently a failonerror="false" attribute that would allow you to continue from the task in spite of compilation failures.

      There had been a problem with the documentation generation that had the warnings attribute not to be documented.  I thought I had fixed that, but maybe I hadn't updated the online documentation.