diff options
| author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-15 21:22:59 +0000 |
|---|---|---|
| committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-15 21:22:59 +0000 |
| commit | 616560f26ea007804c067b90a5d4fc98cf8d26eb (patch) | |
| tree | a9a5ab032f6df4ad0e4b05e98f387273d0f425d6 | |
| parent | fc0dfa6efebb0d5ba53559090240e2693de08221 (diff) | |
| download | ppe42-gcc-616560f26ea007804c067b90a5d4fc98cf8d26eb.tar.gz ppe42-gcc-616560f26ea007804c067b90a5d4fc98cf8d26eb.zip | |
gcc/testsuite/
* lib/target-supports.exp (check_missing_uclibc_feature)
(check_effective_target_wchar): New procedures.
* gcc.dg/wchar_t-1.c: Require target wchar.
* gcc.dg/wint_t-1.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122959 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/wchar_t-1.c | 2 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/wint_t-1.c | 2 | ||||
| -rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 26 |
4 files changed, 35 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4fb39f79e66..e11851c9320 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2007-03-15 Richard Sandiford <richard@codesourcery.com> + * lib/target-supports.exp (check_missing_uclibc_feature) + (check_effective_target_wchar): New procedures. + * gcc.dg/wchar_t-1.c: Require target wchar. + * gcc.dg/wint_t-1.c: Likewise. + +2007-03-15 Richard Sandiford <richard@codesourcery.com> + * lib/target-supports.exp (check_gc_sections_available): Return false for VxWorks targets. diff --git a/gcc/testsuite/gcc.dg/wchar_t-1.c b/gcc/testsuite/gcc.dg/wchar_t-1.c index 6d95c69c304..8e22ece3c67 100644 --- a/gcc/testsuite/gcc.dg/wchar_t-1.c +++ b/gcc/testsuite/gcc.dg/wchar_t-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target wchar } } */ /* { dg-options "-Wall" } */ /* Compile with -Wall to get a warning if built-in and system wchar_t don't diff --git a/gcc/testsuite/gcc.dg/wint_t-1.c b/gcc/testsuite/gcc.dg/wint_t-1.c index 3f88dcbeab0..0574fb9a48f 100644 --- a/gcc/testsuite/gcc.dg/wint_t-1.c +++ b/gcc/testsuite/gcc.dg/wint_t-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target wchar } } */ /* { dg-options "-Wall" } */ /* Compile with -Wall to get a warning if built-in and system wint_t don't diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 834b2d2d8fd..113b8da00cd 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2073,6 +2073,21 @@ proc check_effective_target_uclibc {} { }] } +# Return true if this is a uclibc target and if the uclibc feature +# described by __$feature__ is not present. + +proc check_missing_uclibc_feature {feature} { + if {[check_no_compiler_messages $feature object " + #include <features.h> + #if defined (__UCLIBC__) && !defined (__${feature}__) + #error FOO + #endif + "]} { + return 0 + } + return 1 +} + # Return true if this is a Newlib target. proc check_effective_target_newlib {} { @@ -2205,3 +2220,14 @@ proc check_effective_target_vxworks_kernel { } { #endif }] } + +# Return 1 if the target is expected to provide wide character support. + +proc check_effective_target_wchar { } { + if {[check_missing_uclibc_feature UCLIBC_HAS_WCHAR]} { + return 0 + } + return [check_no_compiler_messages wchar assembly { + #include <wchar.h> + }] +} |

