Fix compilation with gcc

`-Wextra-semi-stmt` is not supported by gcc/g++.

Change-Id: Ic5155f741fc6393b7b3cab6fe3b1b9f52c2e89c9
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/13880
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
diff --git a/build/gen.py b/build/gen.py
index abe019c..6738f44 100755
--- a/build/gen.py
+++ b/build/gen.py
@@ -17,9 +17,9 @@
 # GN's CI builders.
 
 try:  # py3
-    from shlex import quote as shell_quote
+  from shlex import quote as shell_quote
 except ImportError:  # py2
-    from pipes import quote as shell_quote
+  from pipes import quote as shell_quote
 
 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
 REPO_ROOT = os.path.dirname(SCRIPT_DIR)
@@ -296,7 +296,7 @@
     object_ext = '.o'
 
   def escape_path_ninja(path):
-      return path.replace('$ ', '$$ ').replace(' ', '$ ').replace(':', '$:')
+    return path.replace('$ ', '$$ ').replace(' ', '$ ').replace(':', '$:')
 
   def src_to_obj(path):
     return escape_path_ninja('%s' % os.path.splitext(path)[0] + object_ext)
@@ -441,7 +441,6 @@
         '-Wno-unused-parameter',
 
         '-Wextra-semi',
-        '-Wextra-semi-stmt',
         '-Wundef',
 
         '-std=c++17'
@@ -449,7 +448,7 @@
 
     # flag not supported by gcc/g++.
     if not (platform.is_aix() or platform.is_msys() or platform.is_mingw()):
-      cflags.extend(['-Wrange-loop-analysis']);
+      cflags.extend(['-Wrange-loop-analysis', '-Wextra-semi-stmt'])
 
     if platform.is_linux() or platform.is_mingw() or platform.is_msys():
       ldflags.append('-Wl,--as-needed')