Menu

#5618 configure: Fix tests for compiler warning flags.

Fixed
Enhancement
2019-12-02
2019-11-23
No

AC_LANG_PROGRAM ignores compiler warnings. This behaviour made the tests
always true and thus without any effect. We now add -Werror to enforce an
error in case the warning flag is not known.

To make that work it is also necessary to compile confdefs.h without
warnings; we add a hack to undefine macro PACKAGE_NAME, which gets defined
twice for historical reasons.

https://codereview.appspot.com/551210043

Discussion

  • Anonymous

    Anonymous - 2019-11-24

    Passes make, make test-baseline and a full make doc.

     
  • Anonymous

    Anonymous - 2019-11-24
    • Description has changed:

    Diff:

    
    
    • assigned_to: Werner LEMBERG
    • Needs: -->
    • Patch: new --> review
     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2019-11-24

    As said on the review, I don't think we should do this and this case is already fixed for Clang with https://sourceforge.net/p/testlilyissues/issues/5608/.

     
  • Anonymous

    Anonymous - 2019-11-25

    Leaving on Review for now - there seems to be some disagreement on Rietveld - see above comment - (that I am not qualfiied to understand).

     
  • Anonymous

    Anonymous - 2019-11-28
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2019-11-28

    Patch on Coutdown for Nov 30th

     
  • Werner LEMBERG

    Werner LEMBERG - 2019-11-28

    Jonas, what about the hack of confdefs.h? Shall I commit it as a temporary fix until a better solution is found and implemented?

    I will of course abandon the other part of the patch.

     
    • Jonas Hahnfeld

      Jonas Hahnfeld - 2019-11-28

      IMHO there are already too many "ugh" hacks in the build system. This double definition has been there for many years, so I don't see why we need a "temporary" fix (that might stay langer than wanted, as usual when saying "temporary"). But if you think we need it, please go ahead

       
      • Werner LEMBERG

        Werner LEMBERG - 2019-11-28

        Well, it's not really needed, but we will have less warnings in the config.log file, which is a great help IMHO to identify real problems.

         
  • Anonymous

    Anonymous - 2019-11-30

    As there is still anobvious discussion going on here, I'll leave this on review for another countdown.

     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2019-11-30

    Werner, if you think the hack is worth it I'm fine with an updated patch.

     
  • Werner LEMBERG

    Werner LEMBERG - 2019-11-30

    Done.

     
  • Anonymous

    Anonymous - 2019-12-02

    Patch counted down - please push.

     
  • Anonymous

    Anonymous - 2019-12-02
    • Patch: countdown --> push
     
  • Werner LEMBERG

    Werner LEMBERG - 2019-12-02
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
     
  • Werner LEMBERG

    Werner LEMBERG - 2019-12-02

    Pushed to staging as

    commit b577dabf80990b4ba08ccfd5f6dc3874638fe49e
    Author: Werner Lemberg wl@gnu.org
    Date: Sat Nov 23 21:52:37 2019 +0100

    Issue 5618: configure: fix compiler warnings in tests
    
    The `configure` script sets up a small header file `confdefs.h` for tests;
    we add a hack to undefine macro `PACKAGE_NAME`, which gets defined twice for
    historical reasons, and which causes compiler warnings without this change.