summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/testsuite/17_intro
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-23 20:03:30 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-23 20:03:30 +0000
commitf8ef786cfd35341f4c3d1742375e22f829a0876f (patch)
tree743380001d2341c199e3740ca7296f1783cef17c /libstdc++-v3/testsuite/17_intro
parent33020648811e6f8f2313712ecb0e7ba99e2653b7 (diff)
downloadppe42-gcc-f8ef786cfd35341f4c3d1742375e22f829a0876f.tar.gz
ppe42-gcc-f8ef786cfd35341f4c3d1742375e22f829a0876f.zip
2003-09-23 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/locale_facets.tcc: Tweak to avoid warnings. * testsuite/testsuite_hooks.h: Same. * testsuite/*/*.cc: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71693 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/17_intro')
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_cerrno.cc5
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_ciso646.cc119
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_csetjmp.cc4
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_cstdarg.cc4
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_cstddef.cc4
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_cstdio.cc4
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_cstdlib.cc8
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_cstring.cc4
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_ctime.cc5
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_cwchar.cc6
10 files changed, 22 insertions, 141 deletions
diff --git a/libstdc++-v3/testsuite/17_intro/header_cerrno.cc b/libstdc++-v3/testsuite/17_intro/header_cerrno.cc
index bfd869e8685..a8d19cf722b 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cerrno.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cerrno.cc
@@ -1,6 +1,6 @@
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -24,12 +24,13 @@
namespace gnu
{
- void test01()
+ int test01()
{
int i = errno;
#ifndef errno
#error "errno_must_be_a_macro"
#endif
+ return i;
}
}
diff --git a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc b/libstdc++-v3/testsuite/17_intro/header_ciso646.cc
deleted file mode 100644
index 35b1ceef32d..00000000000
--- a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc
+++ /dev/null
@@ -1,119 +0,0 @@
-// 1999-05-20 bkoz
-
-// Copyright (C) 1999, 2003 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// 17.4.1.2 Headers, ciso646
-
-// { dg-do link }
-
-#include <ciso646>
-#include <testsuite_hooks.h>
-
-
-// 2.11 Keywords
-// alternative representations
-// and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq
-
-// C 2.2.2 Header <iso646.h>
-// The tokens (as above) are keywords and do not appear as macros in <ciso646>.
-
-// Test for macros.
-bool test01()
-{
- bool test = true;
-
-#if 0
-
-#ifdef and
- test = false;
-#endif
-
-#ifdef and_eq
- test = false;
-#endif
-
-#ifdef bitand
- test = false;
-#endif
-
-#ifdef bitor
- test = false;
-#endif
-
-#ifdef compl
- test = false;
-#endif
-
-#ifdef not_eq
- test = false;
-#endif
-
-#ifdef not_or
- test = false;
-#endif
-
-#ifdef or
- test = false;
-#endif
-
-#ifdef or_eq
- test = false;
-#endif
-
-#ifdef xor
- test = false;
-#endif
-
-#ifdef xor_eq
- test = false;
-#endif
-
-#endif
-
- return test;
-}
-
-
-// Equivalance in usage.
-bool test02()
-{
- bool test = true;
-
- bool arg1 = true;
- bool arg2 = false;
- int int1 = 45;
- int int2 = 0;
-
- VERIFY( arg1 && int1 );
- VERIFY( arg1 and int1 );
-
- VERIFY( (arg1 && arg2) == (arg1 and arg2) );
- VERIFY( (arg1 && int1) == (arg1 and int1) );
-
- return test;
-}
-
-
-int main(void)
-{
- test01();
- test02();
-
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc b/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc
index 4e2610de4f2..1cbb630e752 100644
--- a/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc
@@ -1,6 +1,6 @@
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -27,7 +27,7 @@ namespace gnu
void test01()
{
std::jmp_buf env;
- int i = setjmp(env);
+ int i __attribute__((unused)) = setjmp(env);
#ifndef setjmp
#error "setjmp_must_be_a_macro"
#endif
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc b/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc
index 260e92905cb..9e82930976e 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc
@@ -1,6 +1,6 @@
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -26,7 +26,7 @@ namespace gnu
{
void test01()
{
- std::va_list list;
+ std::va_list __attribute__((unused)) list;
#ifndef va_arg
#error "va_arg_must_be_a_macro"
#endif
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstddef.cc b/libstdc++-v3/testsuite/17_intro/header_cstddef.cc
index eab1c75386a..69f83f07f3a 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstddef.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstddef.cc
@@ -1,6 +1,6 @@
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -32,7 +32,7 @@ namespace gnu
void test01()
{
- std::size_t i = offsetof(struct test_type, i);
+ std::size_t i __attribute__((unused)) = offsetof(struct test_type, i);
#ifndef offsetof
#error "offsetof_must_be_a_macro"
#endif
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdio.cc b/libstdc++-v3/testsuite/17_intro/header_cstdio.cc
index 383cc0a5293..a7be009f9c4 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstdio.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstdio.cc
@@ -1,6 +1,6 @@
// 2000-01-01 bkoz
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -25,6 +25,6 @@
int main(void)
{
// Make sure size_t is in namespace std
- std::size_t i = 5;
+ std::size_t i __attribute__((unused)) = 5;
return 0;
}
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc
index f86f423d875..377bd60ace4 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc
@@ -1,6 +1,6 @@
// 2000-01-01 bkoz
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -25,15 +25,15 @@
// libstdc++/2190
void test01()
{
- long a = std::abs(1L);
+ long a __attribute__((unused)) = std::abs(1L);
std::div(2L, 1L);
- std::ldiv_t b;
+ std::ldiv_t b __attribute__((unused));
}
void test02()
{
// Make sure size_t is in namespace std.
- std::size_t i = 5;
+ std::size_t i __attribute__((unused)) = 5;
}
int main()
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstring.cc b/libstdc++-v3/testsuite/17_intro/header_cstring.cc
index ae8852a43e0..3085763954b 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstring.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstring.cc
@@ -1,6 +1,6 @@
// 2000-01-01 bkoz
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -26,6 +26,6 @@
int main(void)
{
// Make sure size_t is in namespace std
- std::size_t i = std::strlen("tibet shop/san francisco (415) 982-0326");
+ std::size_t i __attribute__((unused)) = std::strlen("tibet shop/san francisco (415) 982-0326");
return 0;
}
diff --git a/libstdc++-v3/testsuite/17_intro/header_ctime.cc b/libstdc++-v3/testsuite/17_intro/header_ctime.cc
index 03f8294cda6..1b97d645ec7 100644
--- a/libstdc++-v3/testsuite/17_intro/header_ctime.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_ctime.cc
@@ -1,6 +1,6 @@
// 2000-01-01 bkoz
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -22,10 +22,9 @@
#include <ctime>
-
int main(void)
{
// Make sure size_t is in namespace std
- std::size_t i = 5;
+ std::size_t i __attribute__((unused)) = 5;
return 0;
}
diff --git a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc
index 8d65e024195..dc2eefe1431 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc
@@ -1,6 +1,6 @@
// 2000-01-01 bkoz
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -25,9 +25,9 @@
int main(void)
{
// Make sure size_t is in namespace std
- std::size_t i = 5;
+ std::size_t i __attribute__((unused)) = 5;
- std::tm mytime;
+ std::tm __attribute__((unused)) mytime;
return 0;
}
OpenPOWER on IntegriCloud