# Enable build warnings as errors

**URL:** <https://community.br-automation.com/t/enable-build-warnings-as-errors/6597>\
**Category:** B&R Software & Runtime\
**Tags:** automation-studio\
**Created:** [April 14, 2025, 8:53pm UTC](https://community.br-automation.com/t/enable-build-warnings-as-errors/6597 "2025-04-14T20:53:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![allison](https://avatars.discourse-cdn.com/v4/letter/a/FF8800/32.png) [@allison](https://community.br-automation.com/u/allison)\
**Post date:** [April 14, 2025, 8:53pm UTC](https://community.br-automation.com/t/enable-build-warnings-as-errors/6597/1 "2025-04-14T20:53:32Z")

</div>

When building in automation studio, I’m wondering if it’s possible to enable all build warnings as errors? There seem to be some warnings that our development team would like to fail the build if they exist (example: unhandled value in a switch/case block). We are building our project with ANSI C with GCC 4.1.2. I’ve tried passing in the -Werror flag in the build properties which doesn’t make all warnings as errors. Is there another way to turn these warnings into errors?

---

<div class="post-metadata">

**Author:** ![oliver\_D](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/oliver_d/32/257_2.png) [@oliver\_D](https://community.br-automation.com/u/oliver_D)\
**Post date:** [April 15, 2025, 4:53am UTC](https://community.br-automation.com/t/enable-build-warnings-as-errors/6597/2 "2025-04-15T04:53:49Z")

</div>

Hello and welcome !

To my knowledge this is not possible.  
The option -W is to surpress warnings and not to make them an error

best regards  
Oliver

---

<div class="post-metadata">

**Author:** ![hobi72](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/hobi72/32/68_2.png) [@hobi72](https://community.br-automation.com/u/hobi72)\
**Post date:** [April 15, 2025, 6:16am UTC](https://community.br-automation.com/t/enable-build-warnings-as-errors/6597/3 "2025-04-15T06:16:59Z")

</div>

Could be related to gcc 4.1.2 - which is rather old.  
I tried with Automation Studio 6 …

![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/c/cc617fd22afa0fc33a510da4a8039b09ed22f038.png)

I used GCC 11.3.0 with “Additional build options” -Werror -Wextra -pedantic … but I’m not sure if -Wextra and -pedantic is supported in 4.1.2.

CHH
