Is it a good idea to eliminate compiler warnings?

前端 未结 14 2750
既然无缘
既然无缘 2021-02-19 01:00

In the past I\'ve worked with -Wall and other switches for gcc to eliminate every compiler warning for projects I\'ve been involved in. Similarly, in Perl, I always program wit

14条回答
  •  一个人的身影
    2021-02-19 01:51

    My opinion. Yes.

    Like you said at the end. It helps make the real errors more prominent.

    When you run a Perl cgi script that outputs warnings on an Apache Server, the warnings get logged in error.log. Why waste the space. Fix the warnings.

    Also I think it's a learning experience to better understand the language, and compiler. I didn't realize dynamic scoping was even a feature of Perl until I started using strict.

提交回复
热议问题