diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 3a7bf66..4aa9e9b 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -3,10 +3,12 @@
 import platform
 from waflib import Configure, Logs, Utils
 
+
 def options(opt):
     opt.add_option('--debug', '--with-debug', action='store_true', default=False,
                    help='Compile in debugging mode with minimal optimizations (-Og)')
 
+
 def configure(conf):
     conf.start_msg('Checking C++ compiler version')
 
@@ -18,19 +20,22 @@
     if cxx == 'gcc':
         if ccver < (7, 4, 0):
             errmsg = ('The version of gcc you are using is too old.\n'
-                      'The minimum supported gcc version is 7.4.')
+                      'The minimum supported gcc version is 9.3.')
+        elif ccver < (9, 3, 0):
+            warnmsg = ('Using a version of gcc older than 9.3 is not '
+                       'officially supported and may result in build failures.')
         conf.flags = GccFlags()
     elif cxx == 'clang':
         if Utils.unversioned_sys_platform() == 'darwin':
             if ccver < (10, 0, 0):
                 errmsg = ('The version of Xcode you are using is too old.\n'
-                          'The minimum supported Xcode version is 11.3.')
-            elif ccver < (11, 0, 0):
-                warnmsg = ('Using a version of Xcode older than 11.3 is not '
+                          'The minimum supported Xcode version is 12.4.')
+            elif ccver < (12, 0, 0):
+                warnmsg = ('Using a version of Xcode older than 12.4 is not '
                            'officially supported and may result in build failures.')
-        elif ccver < (6, 0, 0):
+        elif ccver < (7, 0, 0):
             errmsg = ('The version of clang you are using is too old.\n'
-                      'The minimum supported clang version is 6.0.')
+                      'The minimum supported clang version is 7.0.')
         conf.flags = ClangFlags()
     else:
         warnmsg = f'{cxx} compiler is unsupported'
@@ -45,7 +50,7 @@
     else:
         conf.end_msg(ccverstr)
 
-    conf.areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)
+    conf.areCustomCxxflagsPresent = len(conf.env.CXXFLAGS) > 0
 
     # General flags are always applied (e.g., selecting C++ language standard)
     generalFlags = conf.flags.getGeneralFlags(conf)
@@ -53,6 +58,7 @@
     conf.add_supported_linkflags(generalFlags['LINKFLAGS'])
     conf.env.DEFINES += generalFlags['DEFINES']
 
+
 @Configure.conf
 def check_compiler_flags(conf):
     # Debug or optimized CXXFLAGS and LINKFLAGS are applied only if the
@@ -75,10 +81,11 @@
 
     conf.env.DEFINES += extraFlags['DEFINES']
 
+
 @Configure.conf
 def add_supported_cxxflags(self, cxxflags):
     """
-    Check which cxxflags are supported by compiler and add them to env.CXXFLAGS variable
+    Check which cxxflags are supported by the active compiler and add them to env.CXXFLAGS variable.
     """
     if len(cxxflags) == 0:
         return
@@ -94,10 +101,11 @@
     self.end_msg(' '.join(supportedFlags))
     self.env.prepend_value('CXXFLAGS', supportedFlags)
 
+
 @Configure.conf
 def add_supported_linkflags(self, linkflags):
     """
-    Check which linkflags are supported by compiler and add them to env.LINKFLAGS variable
+    Check which linkflags are supported by the active compiler and add them to env.LINKFLAGS variable.
     """
     if len(linkflags) == 0:
         return
@@ -114,7 +122,7 @@
     self.env.prepend_value('LINKFLAGS', supportedFlags)
 
 
-class CompilerFlags(object):
+class CompilerFlags:
     def getCompilerVersion(self, conf):
         return tuple(int(i) for i in conf.env.CC_VERSION)
 
@@ -130,94 +138,100 @@
         """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in optimized mode"""
         return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['NDEBUG']}
 
-class GccBasicFlags(CompilerFlags):
+
+class GccClangCommonFlags(CompilerFlags):
     """
-    This class defines basic flags that work for both gcc and clang compilers
+    This class defines common flags that work for both gcc and clang compilers.
     """
+
     def getGeneralFlags(self, conf):
-        flags = super(GccBasicFlags, self).getGeneralFlags(conf)
+        flags = super().getGeneralFlags(conf)
         flags['CXXFLAGS'] += ['-std=c++17']
         if Utils.unversioned_sys_platform() != 'darwin':
             flags['LINKFLAGS'] += ['-fuse-ld=lld']
         return flags
 
+    __cxxFlags = [
+        '-fdiagnostics-color',
+        '-Wall',
+        '-Wextra',
+        '-Wpedantic',
+        '-Wenum-conversion',
+        '-Wextra-semi',
+        '-Wnon-virtual-dtor',
+        '-Wno-unused-parameter',
+    ]
+    __linkFlags = ['-Wl,-O1']
+
     def getDebugFlags(self, conf):
-        flags = super(GccBasicFlags, self).getDebugFlags(conf)
-        flags['CXXFLAGS'] += ['-Og',
-                              '-g3',
-                              '-Wall',
-                              '-Wextra',
-                              '-Wpedantic',
-                              '-Werror',
-                              '-Wcatch-value=2',
-                              '-Wextra-semi',
-                              '-Wnon-virtual-dtor',
-                              '-Wno-error=deprecated-declarations', # Bug #3795
-                              '-Wno-error=maybe-uninitialized', # Bug #1615
-                              '-Wno-unused-parameter',
-                              ]
-        flags['LINKFLAGS'] += ['-Wl,-O1']
+        flags = super().getDebugFlags(conf)
+        flags['CXXFLAGS'] += ['-Og', '-g'] + self.__cxxFlags + [
+            '-Werror',
+            '-Wno-error=deprecated-declarations', # Bug #3795
+            '-Wno-error=maybe-uninitialized', # Bug #1615
+        ]
+        flags['LINKFLAGS'] += self.__linkFlags
         return flags
 
     def getOptimizedFlags(self, conf):
-        flags = super(GccBasicFlags, self).getOptimizedFlags(conf)
-        flags['CXXFLAGS'] += ['-O2',
-                              '-g',
-                              '-Wall',
-                              '-Wextra',
-                              '-Wpedantic',
-                              '-Wcatch-value=2',
-                              '-Wextra-semi',
-                              '-Wnon-virtual-dtor',
-                              '-Wno-unused-parameter',
-                              ]
-        flags['LINKFLAGS'] += ['-Wl,-O1']
+        flags = super().getOptimizedFlags(conf)
+        flags['CXXFLAGS'] += ['-O2', '-g1'] + self.__cxxFlags
+        flags['LINKFLAGS'] += self.__linkFlags
         return flags
 
-class GccFlags(GccBasicFlags):
+
+class GccFlags(GccClangCommonFlags):
+    __cxxFlags = [
+        '-Wcatch-value=2',
+        '-Wcomma-subscript', # enabled by default in C++20
+        '-Wduplicated-branches',
+        '-Wduplicated-cond',
+        '-Wlogical-op',
+        '-Wredundant-tags',
+        '-Wvolatile', # enabled by default in C++20
+    ]
+
     def getDebugFlags(self, conf):
-        flags = super(GccFlags, self).getDebugFlags(conf)
-        flags['CXXFLAGS'] += ['-fdiagnostics-color',
-                              '-Wredundant-tags',
-                              ]
+        flags = super().getDebugFlags(conf)
+        flags['CXXFLAGS'] += self.__cxxFlags
         if platform.machine() == 'armv7l':
             flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
         return flags
 
     def getOptimizedFlags(self, conf):
-        flags = super(GccFlags, self).getOptimizedFlags(conf)
-        flags['CXXFLAGS'] += ['-fdiagnostics-color',
-                              '-Wredundant-tags',
-                              ]
+        flags = super().getOptimizedFlags(conf)
+        flags['CXXFLAGS'] += self.__cxxFlags
         if platform.machine() == 'armv7l':
             flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
         return flags
 
-class ClangFlags(GccBasicFlags):
+
+class ClangFlags(GccClangCommonFlags):
     def getGeneralFlags(self, conf):
-        flags = super(ClangFlags, self).getGeneralFlags(conf)
+        flags = super().getGeneralFlags(conf)
         if Utils.unversioned_sys_platform() == 'darwin':
             # Bug #4296
             brewdir = '/opt/homebrew' if platform.machine() == 'arm64' else '/usr/local'
-            flags['CXXFLAGS'] += [['-isystem', f'{brewdir}/include'], # for Homebrew
-                                  ['-isystem', '/opt/local/include']] # for MacPorts
+            flags['CXXFLAGS'] += [
+                ['-isystem', f'{brewdir}/include'], # for Homebrew
+                ['-isystem', '/opt/local/include'], # for MacPorts
+            ]
         elif Utils.unversioned_sys_platform() == 'freebsd':
             # Bug #4790
             flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
         return flags
 
+    __cxxFlags = [
+        '-Wundefined-func-template',
+        '-Wno-unused-local-typedef', # Bugs #2657 and #3209
+    ]
+
     def getDebugFlags(self, conf):
-        flags = super(ClangFlags, self).getDebugFlags(conf)
-        flags['CXXFLAGS'] += ['-fcolor-diagnostics',
-                              '-Wundefined-func-template',
-                              '-Wno-unused-local-typedef', # Bugs #2657 and #3209
-                              ]
+        flags = super().getDebugFlags(conf)
+        flags['CXXFLAGS'] += self.__cxxFlags
         return flags
 
     def getOptimizedFlags(self, conf):
-        flags = super(ClangFlags, self).getOptimizedFlags(conf)
-        flags['CXXFLAGS'] += ['-fcolor-diagnostics',
-                              '-Wundefined-func-template',
-                              '-Wno-unused-local-typedef', # Bugs #2657 and #3209
-                              ]
+        flags = super().getOptimizedFlags(conf)
+        flags['CXXFLAGS'] += self.__cxxFlags
         return flags
