00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "config.h"
00023 #include "system.h"
00024 #include "tree.h"
00025 #include "cpplib.h"
00026 #include "c-common.h"
00027 #include "c-pragma.h"
00028 #include "toplev.h"
00029 #include "tm_p.h"
00030
00031 static void ia64_hpux_add_pragma_builtin PARAMS ((tree func));
00032
00033 void
00034 ia64_hpux_handle_builtin_pragma (pfile)
00035 cpp_reader *pfile ATTRIBUTE_UNUSED;
00036 {
00037
00038
00039 enum cpp_ttype type;
00040 tree x;
00041
00042 type = c_lex (&x);
00043 while (type == CPP_NAME)
00044 {
00045 ia64_hpux_add_pragma_builtin (x);
00046 type = c_lex (&x);
00047 if (type == CPP_COMMA)
00048 type = c_lex (&x);
00049 }
00050 if (type != CPP_EOF)
00051 warning ("malformed #pragma builtin");
00052 }
00053
00054
00055
00056
00057
00058
00059 typedef struct c89_mathlib_names
00060 {
00061 const char *realname;
00062 const char *c89name;
00063 } c89_mathlib_names;
00064
00065 static const c89_mathlib_names c89_mathlib_name_list [] =
00066 {
00067 {"acos", "_Acos_e#"},
00068 {"acosd", "_Acosd_e#"},
00069 {"acosdf", "_Acosdf_e#"},
00070 {"acosdl", "_Acosdl_e#"},
00071 {"acosdw", "_Acosdw_e#"},
00072 {"acosf", "_Acosf_e#"},
00073 {"acosh", "_Acosh_e#"},
00074 {"acoshf", "_Acoshf_e#"},
00075 {"acoshl", "_Acoshl_e#"},
00076 {"acoshw", "_Acoshw_e#"},
00077 {"acosl", "_Acosl_e#"},
00078 {"acosw", "_Acosw_e#"},
00079 {"asin", "_Asin_e#"},
00080 {"asind", "_Asind_e#"},
00081 {"asindf", "_Asindf_e#"},
00082 {"asindl", "_Asindl_e#"},
00083 {"asindw", "_Asindw_e#"},
00084 {"asinf", "_Asinf_e#"},
00085 {"asinl", "_Asinl_e#"},
00086 {"asinw", "_Asinw_e#"},
00087 {"atanh", "_Atanh_e#"},
00088 {"atanhf", "_Atanhf_e#"},
00089 {"atanhl", "_Atanhl_e#"},
00090 {"atanhw", "_Atanhw_e#"},
00091 {"cosh", "_Cosh_e#"},
00092 {"coshf", "_Coshf_e#"},
00093 {"coshl", "_Coshl_e#"},
00094 {"coshw", "_Coshw_e#"},
00095 {"exp2", "_Exp2_e#"},
00096 {"exp2f", "_Exp2f_e#"},
00097 {"exp2l", "_Exp2l_e#"},
00098 {"exp2w", "_Exp2w_e#"},
00099 {"exp", "_Exp_e#"},
00100 {"expf", "_Expf_e#"},
00101 {"expl", "_Expl_e#"},
00102 {"expm1", "_Expm1_e#"},
00103 {"expm1f", "_Expm1f_e#"},
00104 {"expm1l", "_Expm1l_e#"},
00105 {"expm1w", "_Expm1w_e#"},
00106 {"expw", "_Expw_e#"},
00107 {"fmod", "_Fmod_e#"},
00108 {"fmodf", "_Fmodf_e#"},
00109 {"fmodl", "_Fmodl_e#"},
00110 {"fmodw", "_Fmodw_e#"},
00111 {"gamma", "_Gamma_e#"},
00112 {"gammaf", "_Gammaf_e#"},
00113 {"gammal", "_Gammal_e#"},
00114 {"gammaw", "_Gammaw_e#"},
00115 {"ldexp", "_Ldexp_e#"},
00116 {"ldexpf", "_Ldexpf_e#"},
00117 {"ldexpl", "_Ldexpl_e#"},
00118 {"ldexpw", "_Ldexpw_e#"},
00119 {"lgamma", "_Lgamma_e#"},
00120 {"lgammaf", "_Lgammaf_e#"},
00121 {"lgammal", "_Lgammal_e#"},
00122 {"lgammaw", "_Lgammaw_e#"},
00123 {"log10", "_Log10_e#"},
00124 {"log10f", "_Log10f_e#"},
00125 {"log10l", "_Log10l_e#"},
00126 {"log10w", "_Log10w_e#"},
00127 {"log1p", "_Log1p_e#"},
00128 {"log1pf", "_Log1pf_e#"},
00129 {"log1pl", "_Log1pl_e#"},
00130 {"log1pw", "_Log1pw_e#"},
00131 {"log2", "_Log2_e#"},
00132 {"log2f", "_Log2f_e#"},
00133 {"log2l", "_Log2l_e#"},
00134 {"log2w", "_Log2w_e#"},
00135 {"log", "_Log_e#"},
00136 {"logb", "_Logb_e#"},
00137 {"logbf", "_Logbf_e#"},
00138 {"logbl", "_Logbl_e#"},
00139 {"logbw", "_Logbw_e#"},
00140 {"logf", "_Logf_e#"},
00141 {"logl", "_Logl_e#"},
00142 {"logw", "_Logw_e#"},
00143 {"nextafter", "_Nextafter_e#"},
00144 {"nextafterf", "_Nextafterf_e#"},
00145 {"nextafterl", "_Nextafterl_e#"},
00146 {"nextafterw", "_Nextafterw_e#"},
00147 {"pow", "_Pow_e#"},
00148 {"powf", "_Powf_e#"},
00149 {"powl", "_Powl_e#"},
00150 {"poww", "_Poww_e#"},
00151 {"remainder", "_Remainder_e#"},
00152 {"remainderf", "_Remainderf_e#"},
00153 {"remainderl", "_Remainderl_e#"},
00154 {"remainderw", "_Remainderw_e#"},
00155 {"scalb", "_Scalb_e#"},
00156 {"scalbf", "_Scalbf_e#"},
00157 {"scalbl", "_Scalbl_e#"},
00158 {"scalbw", "_Scalbw_e#"},
00159 {"sinh", "_Sinh_e#"},
00160 {"sinhf", "_Sinhf_e#"},
00161 {"sinhl", "_Sinhl_e#"},
00162 {"sinhw", "_Sinhw_e#"},
00163 {"sqrt", "_Sqrt_e#"},
00164 {"sqrtf", "_Sqrtf_e#"},
00165 {"sqrtl", "_Sqrtl_e#"},
00166 {"sqrtw", "_Sqrtw_e#"},
00167 {"tgamma", "_Tgamma_e#"},
00168 {"tgammaf", "_Tgammaf_e#"},
00169 {"tgammal", "_Tgammal_e#"},
00170 {"tgammaw", "_Tgammaw_e#"}
00171 };
00172
00173 static void
00174 ia64_hpux_add_pragma_builtin (func)
00175 tree func;
00176 {
00177 size_t i;
00178
00179 if (!flag_isoc94 && flag_iso)
00180 {
00181 for (i = 0; i < ARRAY_SIZE (c89_mathlib_name_list); i++)
00182 {
00183 if (!strcmp(c89_mathlib_name_list[i].realname,
00184 IDENTIFIER_POINTER (func)))
00185 {
00186 add_to_renaming_pragma_list(func,
00187 get_identifier(c89_mathlib_name_list[i].c89name));
00188 }
00189 }
00190 }
00191 }