diff options
author | fjh <fjh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-05 12:17:45 +0000 |
---|---|---|
committer | fjh <fjh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-05 12:17:45 +0000 |
commit | 67d77d59ebf9bf4c11db331218517924ebcadb73 (patch) | |
tree | 105a2919154859f7d662864db7555e317b9cc8c0 /gcc/main.c | |
parent | 6b451f90f8bb83ff1a85c6d8cbd67bda10de5ded (diff) | |
download | gcc-67d77d59ebf9bf4c11db331218517924ebcadb73.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40247 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/main.c')
-rw-r--r-- | gcc/main.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/main.c b/gcc/main.c new file mode 100644 index 00000000000..34f7aa865df --- /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); +} |