aboutsummaryrefslogtreecommitdiff
path: root/gcc/main.c
diff options
context:
space:
mode:
authorFergus Henderson <fjh@cs.mu.oz.au>2001-03-05 12:17:45 +0000
committerFergus Henderson <fjh@gcc.gnu.org>2001-03-05 12:17:45 +0000
commitaa5b94de8489f1c17727c69aec521ffa660622a6 (patch)
tree105a2919154859f7d662864db7555e317b9cc8c0 /gcc/main.c
parenta22f570364f4497027c873bcdcad34dd272ef115 (diff)
downloadgcc-aa5b94de8489f1c17727c69aec521ffa660622a6.zip
gcc-aa5b94de8489f1c17727c69aec521ffa660622a6.tar.gz
gcc-aa5b94de8489f1c17727c69aec521ffa660622a6.tar.bz2
Put main() in a separate file, so that the language
front-end can use a different main(). * main.c: New. * toplev.c: (main): Rename as toplev_main. * toplev.h: Declare toplev_main. * Makefile.in (OBJS): add toplev.o. (BACKEND): remove toplev.o, add main.o. From-SVN: r40247
Diffstat (limited to 'gcc/main.c')
-rw-r--r--gcc/main.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/main.c b/gcc/main.c
new file mode 100644
index 0000000..34f7aa8
--- /dev/null
+++ b/gcc/main.c
@@ -0,0 +1,35 @@
+/* main.c: defines main() for cc1, cc1plus, etc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "gansidecl.h"
+#include "toplev.h"
+
+int main PARAMS ((int argc, char **argv));
+
+/* We define main() to call toplev_main(), which is defined in toplev.c.
+ We do this in a separate file in order to allow the language front-end
+ to define a different main(), if it so desires. */
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ return toplev_main (argc, argv);
+}