Skip to content
Snippets Groups Projects
Commit f9642ffe authored by Qing Zhao's avatar Qing Zhao
Browse files

Explicitly document that the "counted_by" attribute is only supported in C.

The "counted_by" attribute currently is only supported in C, mention this
explicitly in documentation and also issue warnings when see "counted_by"
attribute in C++ with -Wattributes.

gcc/c-family/ChangeLog:

	* c-attribs.cc (handle_counted_by_attribute): Is ignored and issues
	warning with -Wattributes in C++ for now.

gcc/ChangeLog:

	* doc/extend.texi: Explicitly mentions counted_by is available
	only in C for now.

gcc/testsuite/ChangeLog:

	* g++.dg/ext/flex-array-counted-by.C: New test.
	* g++.dg/ext/flex-array-counted-by-2.C: New test.
parent 3775f71c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment