This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Rename location accessor macro parameters to silence ARI


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebdad8fc7fd12b52a2dd14cdca735728b2f7ebc7

commit ebdad8fc7fd12b52a2dd14cdca735728b2f7ebc7
Author: Keith Seitz <keiths@redhat.com>
Date:   Fri Aug 14 15:00:04 2015 -0700

    Rename location accessor macro parameters to silence ARI
    
    The locations patch I recently committed contains macro definitions
    such as:
    
    This causes an ARI error to be emitted by the server ("Do not use PTR, ISO C
    90 implies `void *'").  While this ARI error is bogus in this context,
    it is just easiest to squash the error completely by renaming the macro
    parameters.
    
    gdb/ChangeLog
    
    	* location.c (EL_TYPE, EL_LINESPEC, EL_PROBE, EL_ADDRESS)
    	(EL_EXPLICIT, EL_STRING): Change macro parameter to "P" to
    	silence ARI errors.

Diff:
---
 gdb/ChangeLog  |  6 ++++++
 gdb/location.c | 12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 37950b4..0b604fd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2015-08-14  Keith Seitz  <keiths@redhat.com>
+
+	* location.c (EL_TYPE, EL_LINESPEC, EL_PROBE, EL_ADDRESS)
+	(EL_EXPLICIT, EL_STRING): Change macro parameter to "P" to
+	silence ARI errors.
+
 2015-08-14  Iain Buclaw  <ibuclaw@gdcproject.org>
 
 	* d-exp.y (PrimaryExpression : TypeExp '.' IdentifierExp): Use
diff --git a/gdb/location.c b/gdb/location.c
index 49067b9..626f016 100644
--- a/gdb/location.c
+++ b/gdb/location.c
@@ -36,7 +36,7 @@ struct event_location
 {
   /* The type of this breakpoint specification.  */
   enum event_location_type type;
-#define EL_TYPE(PTR) (PTR)->type
+#define EL_TYPE(P) (P)->type
 
   union
   {
@@ -44,22 +44,22 @@ struct event_location
        This representation is used by both "normal" linespecs and
        probes.  */
     char *addr_string;
-#define EL_LINESPEC(PTR) ((PTR)->u.addr_string)
-#define EL_PROBE(PTR) ((PTR)->u.addr_string)
+#define EL_LINESPEC(P) ((P)->u.addr_string)
+#define EL_PROBE(P) ((P)->u.addr_string)
 
     /* An address in the inferior.  */
     CORE_ADDR address;
-#define EL_ADDRESS(PTR) (PTR)->u.address
+#define EL_ADDRESS(P) (P)->u.address
 
     /* An explicit location.  */
     struct explicit_location explicit_loc;
-#define EL_EXPLICIT(PTR) (&((PTR)->u.explicit_loc))
+#define EL_EXPLICIT(P) (&((P)->u.explicit_loc))
   } u;
 
   /* Cached string representation of this location.  This is used, e.g., to
      save stop event locations to file.  Malloc'd.  */
   char *as_string;
-#define EL_STRING(PTR) ((PTR)->as_string)
+#define EL_STRING(P) ((P)->as_string)
 };
 
 /* See description in location.h.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]