This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

integrated cpplib and nonexistant input


Hi!

With integrated cpplib when somebody mistakenly starts cc1 or cc1plus with a
non-existant file, the result is abort():

c-lex.c:
223       if (! cpp_start_read (&parse_in, filename))
224         abort ();

I don't think this is appropriate (eventhough the driver should ensure the
input file exists, when debugging an ICE is quite strange), I think much
better would be to exit with some non-zero code at this point.
That's actually what cppmain.c does as well:

cppmain.c:
  if (! cpp_start_read (pfile, CPP_OPTION (pfile, in_fname)))
    return (FATAL_EXIT_CODE);


Also, gcc/configure.in has
AC_ARG_ENABLE(c-cpplib,
[  --enable-c-cpplib       link cpplib directly into C and C++ compilers
                           (HIGHLY EXPERIMENTAL).],
[if test x$enable_c_cpplib != xyes; then
  maybe_cpplib=
fi]
)
IMHO the comment should speak about --disable-c-cpplib now that it is the
default and HIGHLY EXPERIMENTAL is probably not appropriate either.

	Jakub

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]