]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Support for 64-bit location_t: Frontend parts
authorLewis Hyatt <lhyatt@gmail.com>
Mon, 28 Oct 2024 16:52:23 +0000 (12:52 -0400)
committerLewis Hyatt <lhyatt@gcc.gnu.org>
Sat, 23 Nov 2024 18:44:37 +0000 (13:44 -0500)
The C/C++ frontend code contains a couple instances where a callback
receiving a "location_t" argument is prototyped to take "unsigned int"
instead. This will make a difference once location_t can be configured to a
different type, so adjust that now.

Also remove a comment about -flarge-source-files, which will be removed
shortly.

gcc/c-family/ChangeLog:

* c-indentation.cc (should_warn_for_misleading_indentation): Remove
comment about -flarge-source-files.
* c-lex.cc (cb_ident): Change "unsigned int" argument to type
"location_t".
(cb_def_pragma): Likewise.
(cb_define): Likewise.
(cb_undef): Likewise.

gcc/c-family/c-indentation.cc
gcc/c-family/c-lex.cc

index 6f0900032a2adbb181c0dba84aaf338aefc95ce6..1745ec4e42eb0072a4e1c33901432142636b9d49 100644 (file)
@@ -321,11 +321,6 @@ should_warn_for_misleading_indentation (const token_indent_info &guard_tinfo,
                  "%<-Wmisleading-indentation%> is disabled from this point"
                  " onwards, since column-tracking was disabled due to"
                  " the size of the code/headers");
-         if (!flag_large_source_files)
-           inform (guard_loc,
-                   "adding %<-flarge-source-files%> will allow for more"
-                   " column-tracking support, at the expense of compilation"
-                   " time and memory");
        }
       return false;
     }
index 32f19702c79d29c60736e076b892d03f0e2270ab..90ae4caa2251e927524117b7568f50a7771fd369 100644 (file)
@@ -54,10 +54,10 @@ static tree lex_charconst (const cpp_token *);
 static void update_header_times (const char *);
 static int dump_one_header (splay_tree_node, void *);
 static void cb_line_change (cpp_reader *, const cpp_token *, int);
-static void cb_ident (cpp_reader *, unsigned int, const cpp_string *);
-static void cb_def_pragma (cpp_reader *, unsigned int);
-static void cb_define (cpp_reader *, unsigned int, cpp_hashnode *);
-static void cb_undef (cpp_reader *, unsigned int, cpp_hashnode *);
+static void cb_ident (cpp_reader *, location_t, const cpp_string *);
+static void cb_def_pragma (cpp_reader *, location_t);
+static void cb_define (cpp_reader *, location_t, cpp_hashnode *);
+static void cb_undef (cpp_reader *, location_t, cpp_hashnode *);
 \f
 void
 init_c_lex (void)
@@ -164,7 +164,7 @@ dump_time_statistics (void)
 
 static void
 cb_ident (cpp_reader * ARG_UNUSED (pfile),
-         unsigned int ARG_UNUSED (line),
+         location_t ARG_UNUSED (line),
          const cpp_string * ARG_UNUSED (str))
 {
   if (!flag_no_ident)