+2004-12-01 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ PR preprocessor/17651
+ * c-opts.c (sanitize_cpp_opts): Make flag_no_output imply
+ flag_no_line_commands.
+ * c-ppoutput.c (pp_file_change): Remove now-redundant check of
+ flag_no_output.
+
+ PR preprocessor/17610
+ * directives.c (do_include_common): Error out if an empty filename
+ is given for #include (or #include_next or #import).
+ PR preprocessor/17610
+ * testsuite/gcc.dg/cpp/empty-include.c: New testcase.
+
2004-12-02 Alan Modra <amodra@bigpond.net.au>
PR target/16952
/* Disable -dD, -dN and -dI if normal output is suppressed. Allow
-dM since at least glibc relies on -M -dM to work. */
+ /* Also, flag_no_output implies flag_no_line_commands, always. */
if (flag_no_output)
{
if (flag_dump_macros != 'M')
flag_dump_macros = 0;
flag_dump_includes = 0;
+ flag_no_line_commands = 1;
}
cpp_opts->unsigned_char = !flag_signed_char;
{
const char *flags = "";
- if (flag_no_line_commands || flag_no_output)
+ if (flag_no_line_commands)
return;
if (map != NULL)
if (!fname)
return;
+ if (!*fname)
+ {
+ cpp_error (pfile, CPP_DL_ERROR, "empty filename in #%s",
+ pfile->directive->name);
+ free ((void *) fname);
+ return;
+ }
+
/* Prevent #include recursion. */
if (pfile->line_maps.depth >= CPP_STACK_MAX)
cpp_error (pfile, CPP_DL_ERROR, "#include nested too deeply");