summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorfjh <fjh@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-05 12:17:45 +0000
committerfjh <fjh@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-05 12:17:45 +0000
commit67d77d59ebf9bf4c11db331218517924ebcadb73 (patch)
tree105a2919154859f7d662864db7555e317b9cc8c0 /gcc/toplev.c
parent6b451f90f8bb83ff1a85c6d8cbd67bda10de5ded (diff)
downloadgcc-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/toplev.c')
-rw-r--r--gcc/toplev.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 73f1b8fc517..dd1321c4f31 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -192,7 +192,7 @@ static void print_switch_values PARAMS ((FILE *, int, int, const char *,
const char *progname;
-/* Copy of arguments to main. */
+/* Copy of arguments to toplev_main. */
int save_argc;
char **save_argv;
@@ -4582,14 +4582,15 @@ independent_decode_option (argc, argv)
return 1;
}
-/* Entry point of cc1/c++. Decode command args, then call compile_file.
- Exit code is 35 if can't open files, 34 if fatal error,
- 33 if had nonfatal errors, else success. */
-
-extern int main PARAMS ((int, char **));
+/* Entry point of cc1, cc1plus, jc1, f771, etc.
+ Decode command args, then call compile_file.
+ Exit code is FATAL_EXIT_CODE if can't open files or if there were
+ any errors, or SUCCESS_EXIT_CODE if compilation succeeded.
+
+ It is not safe to call this function more than once. */
int
-main (argc, argv)
+toplev_main (argc, argv)
int argc;
char **argv;
{