+2016-10-02 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/ext/asm3.C (two): Only use register keyword for C++14 and
+ earlier.
+ * g++.dg/charset/asm2.c (memmove): Likewise.
+ * g++.dg/tls/diag-2.C (foo): Expect -Wregister error for C++17.
+ * g++.dg/tls/diag-4.C (foo): Likewise.
+ * c-c++-common/vector-subscript-2.c (vf): Change dg-error to
+ dg-warning, fix up regex.
+ * g++.old-deja/g++.brendan/warnings4.C: Limit to c++14_down targets.
+ * g++.old-deja/g++.mike/p700.C: Add -Wno-register.
+ * g++.old-deja/g++.mike/net31.C: Likewise.
+ * g++.old-deja/g++.other/regstack.C (foo): Expect -Wregister warning
+ for C++17.
+ * g++.old-deja/g++.jason/enum3.C: Add -Wno-register.
+ * g++.old-deja/g++.eh/ia64-1.C: Likewise.
+
2016-10-01 Richard Biener <rguenther@suse.de>
PR middle-end/77798
float vf(int i)
{
- register vector float a; // { dg-error "ISO C++1z does not allow 'register' storage class specifier" "" { target c++1z } }
+ register vector float a; // { dg-warning "ISO C\\+\\+1z does not allow 'register' storage class specifier" "" { target c++1z } }
return a[0];
}
void *
memmove (void *__dest, __const void *__src, size_t __n)
{
- register unsigned long int __d0, __d1, __d2;
+#if __cplusplus <= 201402L
+ register
+#endif
+ unsigned long int __d0, __d1, __d2;
if (__dest < __src)
__asm__ __volatile__
("cld\n\t"
int two(int in)
{
- register int out;
+#if __cplusplus <= 201402L
+ register
+#endif
+ int out;
__asm__ ("" : "r" (out) : "r" (in));
return out;
}
-// { dg-message "error:" "" { target *-*-* } 11 }
+// { dg-message "error:" "" { target *-*-* } 14 }
auto __thread int l2; /* { dg-error "multiple storage classes|data types" } */
__thread extern int l3; /* { dg-error "'__thread' before 'extern'" } */
register __thread int l4; /* { dg-error "multiple storage classes" } */
-}
+} /* { dg-error "ISO C\\+\\+1z does not allow 'register' storage class specifier" "" { target c++1z } .-1 } */
__thread void f1 (); /* { dg-error "invalid for function" } */
extern __thread void f2 (); /* { dg-error "invalid for function" } */
{
__thread auto int l2; /* { dg-error "multiple storage classes|data types" } */
__thread register int l4; /* { dg-error "multiple storage classes" } */
-}
+} /* { dg-error "ISO C\\+\\+1z does not allow 'register' storage class specifier" "" { target c++1z } .-1 } */
-// { dg-do assemble }
+// { dg-do assemble { target c++14_down } }
// GROUPS passed warnings
int
main ()
// { dg-do run }
-// { dg-options "-O2" }
+// { dg-options "-O2 -Wno-register" }
#include <exception>
// { dg-do assemble }
-// { dg-options "-Wall" }
+// { dg-options "-Wall -Wno-register" }
enum tristate { no = -1, maybe, yes };
// { dg-do assemble }
+// { dg-additional-options "-Wno-register" }
class foo_a {
protected:
// { dg-do assemble }
-// { dg-options "-Wno-deprecated" }
+// { dg-options "-Wno-deprecated -Wno-register" }
// { dg-error "limited range of data type" "16-bit target" { target xstormy16-*-* } 0 }
// prms-id: 700
inline double foo (double x)
{
- register double r;
+ register double r; // { dg-warning "ISO C\\+\\+1z does not allow 'register' storage class specifier" "" { target c++1z } }
asm volatile ("fsqrt" : "=t" (r) : "0" (x));
return r;
}