input.h: use STATIC_ASSERT
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 30 Apr 2018 13:50:22 +0000 (13:50 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Mon, 30 Apr 2018 13:50:22 +0000 (13:50 +0000)
gcc/ChangeLog:
* input.h (builtins_location_check): Convert to a STATIC_ASSERT.

From-SVN: r259766

gcc/ChangeLog
gcc/input.h

index af84646286026e46bdbe227c9ee4db4822719a7b..15c3059d710e2be7e35dffedcbbf04a321f553f0 100644 (file)
@@ -1,3 +1,7 @@
+2018-04-30  David Malcolm  <dmalcolm@redhat.com>
+
+       * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
+
 2018-04-30  Richard Biener  <rguenther@suse.de>
 
        * tree-cfg.c (verify_address): Remove base argument, add
index da5451e8bd11a19f63661bd48012b11530c863d4..cec922f9c8d470c4e4ab7dec81bfd01e7cd0b3d2 100644 (file)
@@ -34,8 +34,7 @@ extern GTY(()) struct line_maps *saved_line_table;
 
 /* line-map.c reserves RESERVED_LOCATION_COUNT to the user.  Ensure
    both UNKNOWN_LOCATION and BUILTINS_LOCATION fit into that.  */
-extern char builtins_location_check[(BUILTINS_LOCATION
-                                    < RESERVED_LOCATION_COUNT) ? 1 : -1];
+STATIC_ASSERT (BUILTINS_LOCATION < RESERVED_LOCATION_COUNT);
 
 extern bool is_location_from_builtin_token (source_location);
 extern expanded_location expand_location (source_location);