toplev.h revision 117395
150397Sobrien/* toplev.h - Various declarations for functions found in toplev.c 290075Sobrien Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 350397Sobrien 490075SobrienThis file is part of GCC. 552284Sobrien 690075SobrienGCC is free software; you can redistribute it and/or modify it under 790075Sobrienthe terms of the GNU General Public License as published by the Free 890075SobrienSoftware Foundation; either version 2, or (at your option) any later 990075Sobrienversion. 1052284Sobrien 1190075SobrienGCC is distributed in the hope that it will be useful, but WITHOUT ANY 1290075SobrienWARRANTY; without even the implied warranty of MERCHANTABILITY or 1390075SobrienFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1490075Sobrienfor more details. 1552284Sobrien 1652284SobrienYou should have received a copy of the GNU General Public License 1790075Sobrienalong with GCC; see the file COPYING. If not, write to the Free 1890075SobrienSoftware Foundation, 59 Temple Place - Suite 330, Boston, MA 1990075Sobrien02111-1307, USA. */ 2052284Sobrien 2190075Sobrien#ifndef GCC_TOPLEV_H 2290075Sobrien#define GCC_TOPLEV_H 2350397Sobrien 2490075Sobrien/* If non-NULL, return one past-the-end of the matching SUBPART of 2590075Sobrien the WHOLE string. */ 2690075Sobrien#define skip_leading_substring(whole, part) \ 2790075Sobrien (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) 2850397Sobrien 2990075Sobrienextern int toplev_main PARAMS ((int, char **)); 3090075Sobrienextern int read_integral_parameter PARAMS ((const char *, const char *, 3152284Sobrien const int)); 3290075Sobrienextern void strip_off_ending PARAMS ((char *, int)); 3390075Sobrienextern void print_time PARAMS ((const char *, long)); 3490075Sobrienextern const char *trim_filename PARAMS ((const char *)); 3590075Sobrienextern void internal_error PARAMS ((const char *, ...)) 3690075Sobrien ATTRIBUTE_NORETURN; 3790075Sobrienextern void fatal_io_error PARAMS ((const char *, ...)) 3890075Sobrien ATTRIBUTE_NORETURN; 3990075Sobrienextern void _fatal_insn_not_found PARAMS ((struct rtx_def *, 4090075Sobrien const char *, int, 4190075Sobrien const char *)) 4290075Sobrien ATTRIBUTE_NORETURN; 4390075Sobrienextern void _fatal_insn PARAMS ((const char *, 4490075Sobrien struct rtx_def *, 4590075Sobrien const char *, int, 4690075Sobrien const char *)) 4790075Sobrien ATTRIBUTE_NORETURN; 4850397Sobrien 4990075Sobrien#define fatal_insn(msgid, insn) \ 5090075Sobrien _fatal_insn (msgid, insn, __FILE__, __LINE__, __FUNCTION__) 5190075Sobrien#define fatal_insn_not_found(insn) \ 5290075Sobrien _fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__) 5390075Sobrien 5490075Sobrien/* None of these functions are suitable for ATTRIBUTE_PRINTF, because 5590075Sobrien each language front end can extend them with its own set of format 5690075Sobrien specifiers. */ 5790075Sobrienextern void warning PARAMS ((const char *, ...)); 5890075Sobrienextern void error PARAMS ((const char *, ...)); 5990075Sobrienextern void fatal_error PARAMS ((const char *, ...)) 6090075Sobrien ATTRIBUTE_NORETURN; 6190075Sobrienextern void pedwarn PARAMS ((const char *, ...)); 6290075Sobrienextern void pedwarn_with_file_and_line PARAMS ((const char *, int, 6390075Sobrien const char *, ...)); 6490075Sobrienextern void warning_with_file_and_line PARAMS ((const char *, int, 6590075Sobrien const char *, ...)); 6690075Sobrienextern void error_with_file_and_line PARAMS ((const char *, int, 6790075Sobrien const char *, ...)); 6890075Sobrienextern void sorry PARAMS ((const char *, ...)); 6990075Sobrien 7090075Sobrienextern void rest_of_decl_compilation PARAMS ((union tree_node *, 7152284Sobrien const char *, int, int)); 7290075Sobrienextern void rest_of_type_compilation PARAMS ((union tree_node *, int)); 7390075Sobrienextern void rest_of_compilation PARAMS ((union tree_node *)); 7452284Sobrien 7590075Sobrienextern void pedwarn_with_decl PARAMS ((union tree_node *, 7690075Sobrien const char *, ...)); 7790075Sobrienextern void warning_with_decl PARAMS ((union tree_node *, 7890075Sobrien const char *, ...)); 7990075Sobrienextern void error_with_decl PARAMS ((union tree_node *, 8090075Sobrien const char *, ...)); 8152284Sobrien 8290075Sobrienextern void announce_function PARAMS ((union tree_node *)); 8350397Sobrien 8490075Sobrienextern void error_for_asm PARAMS ((struct rtx_def *, 8590075Sobrien const char *, ...)); 8690075Sobrienextern void warning_for_asm PARAMS ((struct rtx_def *, 8790075Sobrien const char *, ...)); 8890075Sobrienextern void warn_deprecated_use PARAMS ((union tree_node *)); 8950397Sobrien 90117395Skanextern void output_clean_symbol_name PARAMS ((FILE *, const char *)); 9150397Sobrien#ifdef BUFSIZ 9290075Sobrienextern void output_quoted_string PARAMS ((FILE *, const char *)); 9390075Sobrienextern void output_file_directive PARAMS ((FILE *, const char *)); 9450397Sobrien#endif 9590075Sobrienextern void do_abort PARAMS ((void)) ATTRIBUTE_NORETURN; 9690075Sobrienextern void botch PARAMS ((const char *)) 9752284Sobrien ATTRIBUTE_NORETURN; 9850397Sobrien 9952284Sobrien#ifdef BUFSIZ 10090075Sobrien /* N.B. Unlike all the others, fnotice is just gettext+fprintf, and 10190075Sobrien therefore it can have ATTRIBUTE_PRINTF. */ 10290075Sobrienextern void fnotice PARAMS ((FILE *, const char *, ...)) 10390075Sobrien ATTRIBUTE_PRINTF_2; 10452284Sobrien#endif 10552284Sobrien 10690075Sobrienextern int wrapup_global_declarations PARAMS ((union tree_node **, int)); 10790075Sobrienextern void check_global_declarations PARAMS ((union tree_node **, int)); 10890075Sobrien 10990075Sobrienextern const char *progname; 11090075Sobrienextern const char *dump_base_name; 111117395Skanextern const char *aux_base_name; 11290075Sobrien 113117395Skanextern int target_flags_explicit; 114117395Skan 11590075Sobrien/* The hashtable, so that the C front ends can pass it to cpplib. */ 11690075Sobrienextern struct ht *ident_hash; 11790075Sobrien 118117395Skan/* This function can be used by targets to set the flags originally 119117395Skan implied by -ffast-math and -fno-fast-math. */ 12090075Sobrien 121117395Skanextern void set_fast_math_flags PARAMS ((int)); 12290075Sobrien 123117395Skan/* Return true iff flags are set as if -ffast-math. */ 124117395Skanextern bool fast_math_flags_set_p PARAMS ((void)); 125117395Skan 12690075Sobrien/* The following functions accept a wide integer argument. Rather 12790075Sobrien than having to cast on every function call, we use a macro instead. */ 12890075Sobrien 12990075Sobrien#ifndef exact_log2 13090075Sobrien#define exact_log2(N) exact_log2_wide ((unsigned HOST_WIDE_INT) (N)) 13190075Sobrien#define floor_log2(N) floor_log2_wide ((unsigned HOST_WIDE_INT) (N)) 13290075Sobrien#endif 13390075Sobrienextern int exact_log2_wide PARAMS ((unsigned HOST_WIDE_INT)); 13490075Sobrienextern int floor_log2_wide PARAMS ((unsigned HOST_WIDE_INT)); 13590075Sobrien 13690075Sobrien#endif /* ! GCC_TOPLEV_H */ 137