add __attribute__ ((designated_init))

This is v2 of a patch to add __attribute__((designated_init)), and a
corresponding warning flag, to gcc.  This feature comes from sparse.
It is also PR 59855.

v1 is here:

    https://gcc.gnu.org/ml/gcc-patches/2014-01/msg01284.html

I believe I've addressed all the review comments.

2014-07-21  Tom Tromey  <tromey@redhat.com>

	PR c/59855
	* doc/invoke.texi (Warning Options): Document -Wdesignated-init.
	* doc/extend.texi (Type Attributes): Document designated_init
	attribute.

2014-07-21  Tom Tromey  <tromey@redhat.com>

	PR c/59855
	* c.opt (Wdesignated-init): New option.
	* c-common.c (c_common_attribute_table): Add "designated_init".
	(handle_designated_init): New function.

2014-07-21  Tom Tromey  <tromey@redhat.com>

	* c-typeck.c (struct constructor_stack) <designator_depth>: New
	field.
	(really_start_incremental_init, push_init_level): Initialize
	designator_depth.
	(pop_init_level): Set global designator_depth.
	(process_init_element): Check for designated_init attribute.

2014-07-21  Tom Tromey  <tromey@redhat.com>

	PR c/59855
	* gcc.dg/Wdesignated-init.c: New file.
add -Waddress-space and attributes

This patch fixes PR c/59850, a request to import the "force",
"address_space", and "noderef" attributes from sparse.

These are a single patch because the "address_space" and "noderef"
attributes are usefully used together, and because they both interact
with the "force" attribute.

Warnings arising from these attributes are enabled by default.  I did
this because this is what we agreed for the designated_init attribute
-- the point made in that discussion was that it's reasonable for such
a warning to be enabled by default because the use of the attribute is
optional in the first place.

"address_space" marks a pointer as pointing into a numeric address
space.  By default, pointers to different address spaces are
incompatible; the sole exception being the NULL pointer.

In the implementation for address_space I considered using the
existing GCC address-space machinery.  However, that code seemed quite
target-specific to me.  So, I took the simpler approach of just
looking at the attribute.

"noderef" is used to mark pointers that should not be dereferenced.  I
think the implementation of this is reasonably straightforward.

Built and tested on x86-64 Fedora 20.
I've included new test cases.

2014-07-21  Tom Tromey  <tromey@redhat.com>

	PR c/59850:
	* c-common.c (c_common_attribute_table): Add "force",
	"address_space", and "noderef".
	(handle_force_attribute, handle_address_space_attribute)
	(handle_noderef_attribute): New functions.
	* c.opt (Waddress-space): New flag.

2014-07-21  Tom Tromey  <tromey@redhat.com>

	PR c/59850:
	* c-typeck.c (noderef_p, type_force_p, get_sparse_address_space):
	New functions.
	(null_pointer_constant_p, parser_build_binary_op)
	(build_unary_op, build_conditional_expr, build_c_cast)
	(convert_for_assignment, build_binary_op): Check new attributes.
	* c-decl.c (do_check_noderef, check_noderef): New functions.
	(finish_decl, finish_function): Call check_noderef.

2014-07-21  Tom Tromey  <tromey@redhat.com>

	PR c/59850:
	* gcc.dg/attr-noderef.c: New file.
	* gcc.dg/Waddress-space.c: New file.