gnu/gcc/ebdd571ddf4711320bb8628df1d4179d3f2e8e75 gccrs: Add new compiler flag for parsing & compiling C-style string literals
gcc/rust/ChangeLog:
* lang.opt: Add new -frust-c-style-string-literals option.
* parse/rust-parse.h: Import options.h for reading flag_c_style_string_literals.
* parse/rust-parse-impl-expr.hxx (Parser<ManagedTokenSource>::parse_literal_expr):
Abort parsing C-style string literals if flag_c_style_string_literals is not set.
(Parser<ManagedTokenSource>::null_denotation_not_path): Ditto.
gcc/testsuite/ChangeLog:
* rust/execute/torture/c_string.rs: Set -frust-c-style-string-literals.
* rust/compile/c_string_null_byte_check.rs: Set -frust-c-style-string-literals.
Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
5 files changed