lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 2f9d615f 8/9: Move a definition


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2f9d615f 8/9: Move a definition
Date: Tue, 28 Jun 2022 22:26:46 -0400 (EDT)

branch: master
commit 2f9d615f4fc2cef58c2adbde8f0e71808749e2cc
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Move a definition
    
    The variable $(treat_warnings_as_errors) is of course not actually
    necessary. It exists only to obstruct any temptation to alphabetize
    '-pedantic-errors' and '-Werror' with other "warnings", where they
    would be harder to notice. Unlike the others, these two are not
    warnings as such: rather, they're options that make warnings fatal.
    
    This is clearest when the variable is defined immediately before use.
---
 compiler_gcc.make | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler_gcc.make b/compiler_gcc.make
index d50f6028..0951ad4a 100644
--- a/compiler_gcc.make
+++ b/compiler_gcc.make
@@ -123,8 +123,6 @@ else ifneq (,$(filter $(gcc_version), 11 11.0))
 
 endif
 
-treat_warnings_as_errors := -pedantic-errors -Werror
-
 # Write '-Wno' options at the end, with a rationale here.
 #
 # -Wabi: useful only for a special purpose
@@ -144,6 +142,8 @@ treat_warnings_as_errors := -pedantic-errors -Werror
 # -Wswitch-default: false positives for switches on enums that
 #   include all cases (verified by -Wswitch-enum)
 
+treat_warnings_as_errors := -pedantic-errors -Werror
+
 gcc_common_warnings := \
   $(treat_warnings_as_errors) \
   -Waggregate-return \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]