Remove unnecessary parentheses in declarations
authorEgeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
Wed, 11 Oct 2017 10:00:48 +0000 (11:00 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 11 Oct 2017 10:00:48 +0000 (11:00 +0100)
GCC commit a94975e57 ("C++ warning on vexing parse") introduces new
warnings "unnecessary parentheses in the declaration of ...".  These
cause the build of binutils and gdb to fail.  This patch removes those
parentheses for a successful build.

gdb/ChangeLog:
2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>

* macrotab.h (macro_lookup_inclusion): Remove unnecessary
parentheses in the declaration.
(macro_lookup_inclusion): Likewise.
(macro_lookup_definition): Likewise.
* p-lang.h (pascal_builtin_types): Likewise.
* tui/tui-data.c (tui_win_list): Likewise.
* tui/tui-data.h (tui_win_list): Likewise.
* utils.h (make_cleanup_free_section_addr_info): Likewise.

gdb/ChangeLog
gdb/macrotab.h
gdb/p-lang.h
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/utils.h

index 459f0ff3a9b2c76cda9628550c26440701ce9a20..39511502890afc84e9f71fb711b5a334b22646c3 100644 (file)
@@ -1,3 +1,14 @@
+2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
+
+       * macrotab.h (macro_lookup_inclusion): Remove unnecessary
+       parentheses in the declaration.
+       (macro_lookup_inclusion): Likewise.
+       (macro_lookup_definition): Likewise.
+       * p-lang.h (pascal_builtin_types): Likewise.
+       * tui/tui-data.c (tui_win_list): Likewise.
+       * tui/tui-data.h (tui_win_list): Likewise.
+       * utils.h (make_cleanup_free_section_addr_info): Likewise.
+
 2017-10-11  Mark Rages  <markrages@gmail.com>
 
        * target-memory.c (block_boundaries): Fix for block address not
index 16e959a1dd8222b4761309a84fcbdece5e92badd..4eff80f22ce743ac501b386e42d99dfc9170012e 100644 (file)
@@ -230,9 +230,9 @@ void macro_define_special (struct macro_table *table);
    path.  e.g., `stdio.h', not `/usr/include/stdio.h'.  If NAME
    appears more than once in the inclusion tree, return the
    least-nested inclusion --- the one closest to the main source file.  */
-struct macro_source_file *(macro_lookup_inclusion
-                           (struct macro_source_file *source,
-                            const char *name));
+struct macro_source_file *macro_lookup_inclusion
+                          (struct macro_source_file *source,
+                           const char *name);
 
 
 /* Record an object-like #definition (i.e., one with no parameter list).
@@ -315,9 +315,9 @@ struct macro_definition
    effect at the end of the file.  The macro table owns the structure;
    the caller need not free it.  Return zero if NAME is not #defined
    at that point.  */
-struct macro_definition *(macro_lookup_definition
-                          (struct macro_source_file *source,
-                           int line, const char *name));
+struct macro_definition *macro_lookup_definition
+                         (struct macro_source_file *source,
+                          int line, const char *name);
 
 
 /* Return the source location of the definition for NAME in scope at
@@ -325,11 +325,11 @@ struct macro_definition *(macro_lookup_definition
    number of the definition, and return a source file structure for
    the file.  Return zero if NAME has no definition in scope at that
    point, and leave *DEFINITION_LINE unchanged.  */
-struct macro_source_file *(macro_definition_location
-                           (struct macro_source_file *source,
-                            int line,
-                            const char *name,
-                            int *definition_line));
+struct macro_source_file *macro_definition_location
+                          (struct macro_source_file *source,
+                           int line,
+                           const char *name,
+                           int *definition_line);
 
 /* Prototype for a callback callable when walking a macro table.  NAME
    is the name of the macro, and DEFINITION is the definition.  SOURCE
index 96a290b8e0b6e627392db0671397d45ab3068f34..1f82c1ac1f49a6ec906985025a2758341ff88fe0 100644 (file)
@@ -59,7 +59,7 @@ extern void pascal_printstr (struct ui_file *, struct type *, const gdb_byte *,
                             unsigned int, const char *, int,
                             const struct value_print_options *);
 
-extern struct type **const (pascal_builtin_types[]);
+extern struct type **const pascal_builtin_types[];
 
 /* These are in p-typeprint.c: */
 
index 749a62e30437646b1a437479040c428cc4acf27e..66e2043369b0176c497a0329ee0770f84263a79a 100644 (file)
@@ -29,7 +29,7 @@
 /****************************
 ** GLOBAL DECLARATIONS
 ****************************/
-struct tui_win_info *(tui_win_list[MAX_MAJOR_WINDOWS]);
+struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS];
 
 /***************************
 ** Private data
index 2a4f55be7979787d7d829c61dd17e53a3ef831bf..7beb272afabcc633e5df128d9f4cf295955f6cfa 100644 (file)
@@ -293,7 +293,7 @@ extern void tui_set_win_highlight (struct tui_win_info *win_info,
 
 
 /* Global Data.  */
-extern struct tui_win_info *(tui_win_list[MAX_MAJOR_WINDOWS]);
+extern struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS];
 
 #define TUI_SRC_WIN     tui_win_list[SRC_WIN]
 #define TUI_DISASM_WIN tui_win_list[DISASSEM_WIN]
index 7af0a5f5aef2321ec2910e62a8a89718a4b8fa7e..17d625819583741bf42611fadaeb1aef391e7675 100644 (file)
@@ -206,8 +206,8 @@ private:
 /* Cleanup utilities.  */
 
 struct section_addr_info;
-extern struct cleanup *(make_cleanup_free_section_addr_info 
-                        (struct section_addr_info *));
+extern struct cleanup *make_cleanup_free_section_addr_info
+                       (struct section_addr_info *);
 
 /* For make_cleanup_close see common/filestuff.h.  */