[Bug 1901] New: Wrong configure result for -Wno-unused-result and gcc-4.4

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Fri May 6 20:46:45 EST 2011


https://bugzilla.mindrot.org/show_bug.cgi?id=1901

           Summary: Wrong configure result for -Wno-unused-result and
                    gcc-4.4
           Product: Portable OpenSSH
           Version: 5.8p2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Build system
        AssignedTo: unassigned-bugs at mindrot.org
        ReportedBy: g.esp at free.fr


Since gcc-4.4, gcc will happily accept -Wno-<anything> for the reason
explained in http://gcc.gnu.org/PR28322

openssh configure test for -Wno-unused-result that is not know by
gcc-4.4 (only on gcc-4.5) but test did not fail.

Each time another warning is emitted (like 
ignoring return value of 'write', declared with attribute
warn_unused_result ), on gcc-4.4 usage of -Wno-unused-result add this
warning
cc1: warning: unrecognized command line option "-Wno-unused-result"

This happen 9 times in openssh-5.8p2

The solution is to test if -Wunused-result is supported and in that
case only -Wno-unused-result could be used.

This is trivial for me to add -Wunused-result detection in
configure.ac.

But I don't know yet how to adapt that. When -Wunused-result is
detected to be supported, I don't know how the no- option only could be
added to supported flags.

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list