This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/4] Make argv const char ** in read_md_files etc
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 6 May 2016 22:43:46 +0200
- Subject: Re: [PATCH 1/4] Make argv const char ** in read_md_files etc
- Authentication-results: sourceware.org; auth=none
- References: <1462394970-55471-1-git-send-email-dmalcolm at redhat dot com> <1462394970-55471-2-git-send-email-dmalcolm at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, May 04, 2016 at 04:49:27PM -0400, David Malcolm wrote:
> This patch makes the argv param to read_md_files const, needed
> so that the RTL frontend can call it on a const char *.
>
> While we're at it, it similarly makes const the argv for all
> of the "main" functions of the various gen*.
Just noticed this broken make mddump.
Fixed thusly, committed as obvious:
2016-05-06 Jakub Jelinek <jakub@redhat.com>
* genmddump.c (main): Convert argv from char ** to const char **.
--- gcc/genmddump.c.jj 2016-01-04 14:55:53.000000000 +0100
+++ gcc/genmddump.c 2016-05-06 22:40:01.537097183 +0200
@@ -35,10 +35,10 @@
#include "gensupport.h"
-extern int main (int, char **);
+extern int main (int, const char **);
int
-main (int argc, char **argv)
+main (int argc, const char **argv)
{
progname = "genmddump";
@@ -57,4 +57,3 @@ main (int argc, char **argv)
fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
}
-
Jakub