Patchwork [testsuite] : Fix test case for int=16 platforms

login
register
mail settings
Submitter Georg-Johann Lay
Date Jan. 13, 2012, 10:07 a.m.
Message ID <4F10025F.4080601@gjlay.de>
Download mbox | patch
Permalink /patch/135771/
State New
Headers show

Comments

Georg-Johann Lay - Jan. 13, 2012, 10:07 a.m.
This fixed multi-char testcase that would otherwise lead to "constant exceeds
its type" message and thus FAIL.

Use 2-letter constant is sufficient and don't break on int=16 platforms.

Ok to apply?

Johann

	* gcc.dg/cpp/warn-multichar-2.c: Fix to work on int=16 platforms.

 #endif
Mike Stump - Jan. 13, 2012, 4:50 p.m.
On Jan 13, 2012, at 2:07 AM, Georg-Johann Lay wrote:
> This fixed multi-char testcase that would otherwise lead to "constant exceeds
> its type" message and thus FAIL.
> 
> Use 2-letter constant is sufficient and don't break on int=16 platforms.
> 
> Ok to apply?

Ok.

Patch

Index: gcc.dg/cpp/warn-multichar-2.c
===================================================================
--- gcc.dg/cpp/warn-multichar-2.c       (revision 183150)
+++ gcc.dg/cpp/warn-multichar-2.c       (working copy)
@@ -1,5 +1,5 @@ 
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=multichar" }
 /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
-#if 'abc'  // { dg-error "multi-character character constant
.-Werror=multichar." }
+#if 'ab'  // { dg-error "multi-character character constant .-Werror=multichar." }