2017-01-05 Martin Liska <mliska@suse.cz>
PR pch/78970
* c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
header.
2017-01-05 Martin Liska <mliska@suse.cz>
PR pch/78970
* gcc.c (lookup_compiler): Reject '-' filename for a precompiled
header.
From-SVN: r244103
+2017-01-05 Martin Liska <mliska@suse.cz>
+
+ PR pch/78970
+ * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
+ header.
+
2017-01-05 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_expand_setmem): Unroll the loop for
+2017-01-05 Martin Liska <mliska@suse.cz>
+
+ PR pch/78970
+ * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
+ header.
+
2017-01-04 Marek Polacek <polacek@redhat.com>
PR c++/64767
in_fnames[0] = "";
}
else if (strcmp (in_fnames[0], "-") == 0)
- in_fnames[0] = "";
+ {
+ if (pch_file)
+ error ("cannot use %<-%> as input filename for a precompiled header");
+
+ in_fnames[0] = "";
+ }
if (out_fname == NULL || !strcmp (out_fname, "-"))
out_fname = "";
{
for (cp = compilers + n_compilers - 1; cp >= compilers; cp--)
if (cp->suffix[0] == '@' && !strcmp (cp->suffix + 1, language))
- return cp;
+ {
+ if (name != NULL && strcmp (name, "-") == 0
+ && (strcmp (cp->suffix, "@c-header") == 0
+ || strcmp (cp->suffix, "@c++-header") == 0))
+ fatal_error (input_location,
+ "cannot use %<-%> as input filename for a "
+ "precompiled header");
+
+ return cp;
+ }
error ("language %s not recognized", language);
return 0;