Hi!

register keyword was removed in C++17, and in vmsdbgout.c it served no
useful purpose.

Tested with x86_64-linux -> ia64-hp-vms cross configured with
CXX='g++ -std=c++17', committed to trunk as obvious.

2021-04-26  Jakub Jelinek  <ja...@redhat.com>

        PR debug/100255
        * vmsdbgout.c (ASM_OUTPUT_DEBUG_STRING, vmsdbgout_begin_block,
        vmsdbgout_end_block, lookup_filename, vmsdbgout_source_line): Remove
        register keywords.

--- gcc/vmsdbgout.c.jj  2021-01-04 10:25:39.834222490 +0100
+++ gcc/vmsdbgout.c     2021-04-26 09:52:45.346898280 +0200
@@ -365,13 +365,13 @@ static char text_end_label[MAX_ARTIFICIA
 #define ASM_OUTPUT_DEBUG_STRING(FILE,P)                \
   do                                           \
     {                                          \
-      register int slen = strlen (P);          \
-      register const char *p = (P);            \
-      register int i;                          \
+      int slen = strlen (P);                   \
+      const char *p = (P);                     \
+      int i;                                   \
       fprintf (FILE, "\t.ascii \"");           \
       for (i = 0; i < slen; i++)               \
        {                                       \
-         register int c = p[i];                \
+         int c = p[i];                         \
          if (c == '\"' || c == '\\')           \
            putc ('\\', FILE);                  \
          if (c >= ' ' && c < 0177)             \
@@ -1229,7 +1229,7 @@ vmsdbgout_end_epilogue (unsigned int lin
    a lexical block.  */
 
 static void
-vmsdbgout_begin_block (register unsigned line, register unsigned blocknum)
+vmsdbgout_begin_block (unsigned line, unsigned blocknum)
 {
   if (write_symbols == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.begin_block) (line, blocknum);
@@ -1242,7 +1242,7 @@ vmsdbgout_begin_block (register unsigned
    lexical block.  */
 
 static void
-vmsdbgout_end_block (register unsigned line, register unsigned blocknum)
+vmsdbgout_end_block (unsigned line, unsigned blocknum)
 {
   if (write_symbols == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.end_block) (line, blocknum);
@@ -1315,8 +1315,8 @@ static unsigned int
 lookup_filename (const char *file_name)
 {
   static unsigned int last_file_lookup_index = 0;
-  register char *fn;
-  register unsigned i;
+  char *fn;
+  unsigned i;
   const char *fnam;
   long long cdt = 0;
   long ebk = 0;
@@ -1405,8 +1405,8 @@ vmsdbgout_write_source_line (unsigned li
 }
 
 static void
-vmsdbgout_source_line (register unsigned line, unsigned int column,
-                      register const char *filename,
+vmsdbgout_source_line (unsigned line, unsigned int column,
+                      const char *filename,
                        int discriminator, bool is_stmt)
 {
   if (write_symbols == VMS_AND_DWARF2_DEBUG)


        Jakub

Reply via email to