[patch 2/6] scalar-storage-order merge: C front-end
Eric Botcazou
ebotcazou@adacore.com
Tue Oct 6 11:02:00 GMT 2015
This is the C front-end + C family part.
* doc/extend.texi (type attributes): Document scalar_storage_order.
(Structure-Packing Pragmas): Rename into...
(Structure-Layout Pragmas): ...this. Document scalar_storage_order.
* doc/invoke.texi (C Dialect Options): Document -fsso-struct
(Warnings): Document -Wno-scalar-storage-order.
* flag-types.h (enum scalar_storage_order_kind): New enumeration.
c-family/
* c-common.c (c_common_attributes): Add scalar_storage_order.
(handle_scalar_storage_order_attribute): New function.
* c-pragma.c (global_sso): New variable.
(maybe_apply_pragma_scalar_storage_order): New function.
(handle_pragma_scalar_storage_order): Likewise.
(init_pragma): Register scalar_storage_order.
* c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
* c.opt (Wscalar-storage-order): New warning.
(fsso-struct=): New option.
c/
* c-decl.c (finish_struct): If the structure has reverse storage
order, rewrite the type of array fields with scalar component. Call
maybe_apply_pragma_scalar_storage_order on entry.
* c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
errors on bit-fields and reverse SSO here and not...
(c_mark_addressable): ...here.
(output_init_element): Adjust call to initializer_constant_valid_p.
(c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
doc/extend.texi | 69 ++++++++++++++++++++++++++++++++++++++++++--------
doc/invoke.texi | 22 +++++++++++++++-
flag-types.h | 9 +++++-
c-family/c.opt | 17 ++++++++++++
c-family/c-common.c | 47 ++++++++++++++++++++++++++++++++++-
c-family/c-pragma.c | 50 +++++++++++++++++++++++++++++++++++++
c-family/c-pragma.h | 1
c/c-typeck.c | 66 ++++++++++++++++++++++++++++++++++---------------
c/c-decl.c | 48 +++++++++++++++++++++++++-----------
8 files changed, 273 insertions(+), 47 deletions(-)
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sso-c.diff
Type: text/x-patch
Size: 21810 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151006/a6bca00d/attachment.bin>
More information about the Gcc-patches
mailing list