This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2, testsuite]: Add dg-error for unsupported floating suffix


On Thu, Nov 15, 2012 at 7:44 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

>>> >> No, the intention of this test is to check if target can handle these
>>> >> suffixes through TARGET_C_MODE_FOR_SUFFIX. Please note that in
>>> >> particular tests, -std=x compile switches are added to compile flags.
>>> >
>>> > But -std=c++11 (well, perhaps -std=gnu++11) could be eventually the default.
>>> > As Q/W suffixes are only supported in certain modes through
>>> > TARGET_C_MODE_FOR_SUFFIX, it is better to put the explicit option that
>>> > allows it on the command line of the check_effective_target* test.
>>>
>>> Do you have option in mind that would be appropriate for the test?
>>
>> "-std=gnu++03" ?
>
> Adding "-w" to skip a warning that this option applies only to c++ did
> the trick.

2012-11-16  Uros Bizjak  <ubizjak@gmail.com>

	* lib/target_suports.exp
	(check_effective_target_has_w_floating_suffix): New procedure.
	(check_effective_target_has_q_floating_suffix): Ditto.
	* g++.dg/cpp0x/gnu_fext-numeric-literals.C: Add dg-error directive
	for unsupported non-standard suffix on floating constant.
	* g++.dg/cpp0x/std_fext-numeric-literals.C: Ditto.

Attached patch was re-tested on alphaev68-linux-gnu and
x86_64-linux-gnu and committed to mainline SVN.

Uros.

Attachment: t.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]