+2012-05-22 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/53322
+ * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
+
2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
Warn about unsuffixed float constants
Wunused-local-typedefs
-C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning
+C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused)
Warn when typedefs locally defined in a function are not used
Wunused-macros
+2012-05-22 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/53322
+ * f95-lang.c (gfc_init_builtin_functions): Remove the unused
+ typedef builtin_type.
+
2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/52428
#undef DEF_POINTER_TYPE
BT_LAST
};
- typedef enum builtin_type builtin_type;
tree mfunc_float[6];
tree mfunc_double[6];
+2012-05-22 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/53322
+ * g++.dg/warn/Wunused-local-typedefs.C: Adjust to use -Wunused
+ instead of -Wunused-local-typedefs.
+
2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51184
// Origin PR c++/33255
-// { dg-options "-Wunused-local-typedefs" }
+// { dg-options "-Wunused" } <-- should trigger -Wunused-local-typedefs
// { dg-do compile }
void
{
typedef struct ST<int> foo;
ST<int> v;
- const foo &var = v;
+ const foo __attribute__((unused))&var = v;
}
void
test4(void)
{
typedef int foo;
- int vec[1] = {sizeof (foo)};
+ int __attribute__((unused))vec[1] = {sizeof (foo)};
}
void
typedef C0 T4;
int v0 = (T0) 2;
- char v1 = static_cast<T1> (0);
- reinterpret_cast<T2> (&v0);
+ char __attribute__((unused)) v1 = static_cast<T1> (0);
+ if (reinterpret_cast<T2> (&v0));
unsigned* const c = 0;
- unsigned* v2 = const_cast<T3* const> (c);
- C0 *p0 = 0;
+ unsigned* __attribute__((unused))v2 = const_cast<T3* const> (c);
+ C0 *__attribute__((unused))p0 = 0;
C1 *p1 = 0;
p0 = dynamic_cast<T4*> (p1);
}
{
struct C0 {};
typedef C0 foo;
- C0 *v = new foo;
+ C0 *__attribute__((unused))v = new foo;
}
template<class T, class U>
+2012-05-22 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/53322
+ * include/bits/stl_algobase.h (lower_bound)
+ (lexicographical_compare): Do not declare unused local typedefs
+ here when Concepts are turned off.
+
2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/22_locale/num_put/put/char/9780-2.cc: Avoid -Wall warnings.
lower_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val)
{
+#ifdef _GLIBCXX_CONCEPT_CHECKS
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
+#endif
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
lexicographical_compare(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2)
{
+#ifdef _GLIBCXX_CONCEPT_CHECKS
// concept requirements
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
+#endif
__glibcxx_function_requires(_InputIteratorConcept<_II1>)
__glibcxx_function_requires(_InputIteratorConcept<_II2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)