Commit 4a8ca690 by Eric Botcazou

c-pragma.c (handle_pragma_scalar_storage_order): Expand on error message for…

c-pragma.c (handle_pragma_scalar_storage_order): Expand on error message for non-uniform endianness and issue a warning in C++.

	* c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
	message for non-uniform endianness and issue a warning in C++.

From-SVN: r252831
parent f5e37f2a
2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
* c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
message for non-uniform endianness and issue a warning in C++.
2017-09-15 Jakub Jelinek <jakub@redhat.com>
* c.opt (Wc++1z-compat): Change from option to undocumented alias.
......
......@@ -415,7 +415,19 @@ handle_pragma_scalar_storage_order (cpp_reader *ARG_UNUSED(dummy))
tree x;
if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN)
error ("scalar_storage_order is not supported");
{
error ("scalar_storage_order is not supported because endianness "
"is not uniform");
return;
}
if (c_dialect_cxx ())
{
if (warn_unknown_pragmas > in_system_header_at (input_location))
warning (OPT_Wunknown_pragmas,
"%<#pragma scalar_storage_order%> is not supported for C++");
return;
}
token = pragma_lex (&x);
if (token != CPP_NAME)
......
2017-09-13 Paolo Carlini <paolo.carlini@oracle.com>
2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
* g++.dg/sso-1.C: New test.
* g++.dg/sso-2.C: Likewise.
2017-09-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/78648
* g++.dg/cpp0x/lambda/lambda-ice21.C: New.
......
/* Test support of scalar_storage_order attribute */
/* { dg-do compile } */
struct __attribute__((scalar_storage_order("little-endian"))) Rec /* { dg-warning "attribute ignored" } */
{
int i;
};
/* Test support of scalar_storage_order pragma */
/* { dg-do compile } */
/* { dg-options "-Wall" } */
#pragma scalar_storage_order little-endian /* { dg-warning "not supported" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment