+2005-11-09 Per Bothner <per@bothner.com>
+ Uros Bizjak <uros@kss-loka.si>
+
+ PR c/24101
+ * toplev.c (process_options): Initialize debug_hooks early
+ in case lang_hooks.post_options ends up calling a debug_hook.
+ * cppinit.c (read_original_filename): Temporarily set
+ state.in_directive before calling _cpp_lex_direct for
+ CPP_HASH tokens.
+
2005-11-07 Steve Ellcey <sje@cup.hp.com>
PR bootstrap/24688
token = _cpp_lex_direct (pfile);
if (token->type == CPP_HASH)
{
+ pfile->state.in_directive = 1;
token1 = _cpp_lex_direct (pfile);
_cpp_backup_tokens (pfile, 1);
+ pfile->state.in_directive = 0;
/* If it's a #line directive, handle it. */
if (token1->type == CPP_NUMBER)
+2005-11-09 Uros Bizjak <uros@kss-loka.si>
+
+ PR c/24101
+ * gcc.dg/pr24101-1.i, gcc.dg/pr24101-2.i: New tests.
+ * gcc.dg/dg.exp: Run main loop also for *.i files.
+
2005-11-02 Josh Conner <jconner@apple.com>
* g++.dg/crash38.C: moved into proper directory...
dg-init
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cSi\]]] \
"" $DEFAULT_CFLAGS
# All done.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-ansi" } */
+
+# 1 "/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.0/include/stddef.h" 1 3 4
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-ansi" } */
+
+#
static void
process_options (void)
{
+ /* Just in case lang_hooks.post_options ends up calling a debug_hook.
+ This can happen with incorrect pre-processed input. */
+ debug_hooks = &do_nothing_debug_hooks;
+
/* Allow the front end to perform consistency checks and do further
initialization based on the command line options. This hook also
sets the original filename if appropriate (e.g. foo.i -> foo.c)
/* Now we know write_symbols, set up the debug hooks based on it.
By default we do nothing for debug output. */
if (write_symbols == NO_DEBUG)
- debug_hooks = &do_nothing_debug_hooks;
+ ;
#if defined(DBX_DEBUGGING_INFO)
else if (write_symbols == DBX_DEBUG)
debug_hooks = &dbx_debug_hooks;