This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] colorize: use isatty module


On 01/03/2012 09:48 AM, Jim Meyering wrote:
Paolo Bonzini wrote:

* bootstrap.conf: Add isatty module.
* gnulib: Update to latest.
* lib/colorize.h: Remove argument from should_colorize.
* lib/ms/colorize.h: Likewise.
* lib/colorize-impl.c: Factor isatty call out of here...
* lib/ms/colorize-impl.c: ... and here...
* src/main.c: ... into here.

Hi Paolo, At least with gcc-4.7.0 20120102, a warning-enabled build now fails like this:

   colorize.c: In function 'init_colorize':
   colorize.c:37:6: error: function might be candidate for attribute 'const' [-Werror=suggest-attribute=const]
   cc1: all warnings being treated as errors

Thanks, my GCC is indeed older.


Perhaps GCC should be changed to avoid the warning on functions returning void. If a void function can be const, it pretty much has to be empty, and so it is quite likely a placeholder for something that is not const.

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]