===================================================================
@@ -1,4 +1,5 @@
// { dg-options "-fabi-version=0" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A {
template <typename T> int f ();
===================================================================
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-options "-fabi-version=0" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A {
template <typename T> int f ();
===================================================================
@@ -1,5 +1,6 @@
// PR c++/58954
// { dg-require-effective-target c++11 }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template<class T>
T&& declval();
===================================================================
@@ -1,6 +1,7 @@
// Test for proper non-deduced context handling of the initializer
// for an auto declaration/new.
// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct with_apply
{
===================================================================
@@ -1,6 +1,7 @@
// PR c++/51186
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
auto main()->int // { dg-error "std=" "std" { target { ! c++11 } } }
- // { dg-error "auto" "auto" { target { ! c++11 } } 3 }
- // { dg-error "no type" "no type" { target { ! c++11 } } 3 }
+ // { dg-error "auto" "auto" { target { ! c++11 } } 4 }
+ // { dg-error "no type" "no type" { target { ! c++11 } } 4 }
{ }
===================================================================
@@ -4,11 +4,11 @@
class CAddress
{
public:
- constexpr CAddress(unsigned long begin) : m_Begin(begin) {}
+ constexpr CAddress(unsigned __INTPTR_TYPE__ begin) : m_Begin(begin) {}
constexpr CAddress(const CAddress &other) : m_Begin(other.m_Begin) {}
private:
- unsigned long m_Begin;
+ unsigned __INTPTR_TYPE__ m_Begin;
};
extern "C" char _lnkDDRRAM;
@@ -15,7 +15,7 @@ extern "C" char _lnkDDRRAM;
/* internal compiler error on gcc 4.6.3 */
const CAddress s_Memmap[2]
{
- {(unsigned long)&_lnkDDRRAM}, /* segmentation fault */
+ {(unsigned __INTPTR_TYPE__)&_lnkDDRRAM}, /* segmentation fault */
{0x40000000},
};
===================================================================
@@ -1,5 +1,6 @@
// PR c++/49921
// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct Local
{
===================================================================
@@ -1,5 +1,6 @@
// PR c++/52597
// { dg-require-effective-target c++11 }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A {
int zip();
===================================================================
@@ -2,6 +2,7 @@
// PR c++/49260
// { dg-options "-fno-asynchronous-unwind-tables -fno-dwarf2-cfi-asm" }
// { dg-do run { target c++11 } }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
#include <exception>
===================================================================
@@ -2,6 +2,7 @@
// Uses of static members and creating pointers to members aren't odr-uses
// of 'this'.
// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A
{
===================================================================
@@ -1,7 +1,7 @@
// { dg-do compile { target c++11 } }
// { dg-options "-fcompare-debug" }
-typedef long unsigned size_t;
+__extension__ typedef __SIZE_TYPE__ size_t;
namespace
{
template < typename _Tp, _Tp __v > struct integral_constant
===================================================================
@@ -1,5 +1,6 @@
// PR c++/57252
// { dg-require-effective-target c++11 }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct foo {
void bar() & {}
===================================================================
@@ -1,5 +1,6 @@
// PR c++/61083
// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template<typename T> T declval();
===================================================================
@@ -1,5 +1,6 @@
// PR c++/58837
// { dg-require-effective-target c++11 }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
void f();
static_assert(f, "");
===================================================================
@@ -1,5 +1,6 @@
// PR c++/61507
// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A {
void foo(const int &);
===================================================================
@@ -1,5 +1,6 @@
// PR c++/55542
// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template <typename ... P>
struct B
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Mangling of classes from std::decimal are special-cased.
// Derived from g++.dg/abi/mangle13.C.
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Mangling of classes from std::decimal are special-cased.
// Derived from g++.dg/abi/mangle15.C.
===================================================================
@@ -1,9 +1,10 @@
// PR c++/33840
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
template<int> struct A
{
struct {} : 2; // { dg-error "expected ';' after struct" "expected" }
};
-// { dg-error "ISO C.. forbids declaration" "declaration" { target *-*-* } 6 }
-// { dg-error "ISO C.. prohibits anonymous" "anonymous" { target *-*-* } 6 }
+// { dg-error "ISO C.. forbids declaration" "declaration" { target *-*-* } 7 }
+// { dg-error "ISO C.. prohibits anonymous" "anonymous" { target *-*-* } 7 }
===================================================================
@@ -1,6 +1,7 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/38228
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A
{
===================================================================
@@ -3,6 +3,7 @@
// Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A
{
===================================================================
@@ -1,4 +1,5 @@
// PR c++/15696
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A {};
===================================================================
@@ -1,6 +1,7 @@
// PR c++/27601
// Origin: Patrik Hägglund <patrik.hagglund@bredband.net>
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
struct bar {
static int foo;
===================================================================
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Wall" } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
typedef int UOW; /* { dg-error "" } */
struct ABC {
===================================================================
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Wall -pedantic" } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
extern "C" {
===================================================================
@@ -1,5 +1,5 @@
// { dg-do compile }
-
+/* { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } } */
// Crash tests from PR middle-end/6994. See also gcc.dg/vla-2.c.
// A::A is acceptable extended C++ (VLA types brought over from C99);
// B::B is not, but is closely related to acceptable extended C, though
===================================================================
@@ -1,4 +1,5 @@
// PR c++/28148
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct foo {
public:
===================================================================
@@ -1,9 +1,10 @@
// PR c++/29106
// { dg-do run }
+__extension__ typedef __SIZE_TYPE__ size_t;
int i;
-void f(__SIZE_TYPE__) {
+void f(size_t) {
i = 3;
}
===================================================================
@@ -1,5 +1,6 @@
// PR c++/39560
// { dg-options -Wunused }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct X { };
===================================================================
@@ -1,4 +1,5 @@
// PR c++/28513
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
class foo { // { dg-error "changes meaning" }
public:
===================================================================
@@ -1,4 +1,5 @@
// PR c++/14668
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
class A {}; // { dg-error "" }
class B {
===================================================================
@@ -1,6 +1,7 @@
// PR c++/37016
// { dg-do run }
// { dg-options "-O2 -Wall" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
/*
Basic design concept is that WorldObject implements remote method call
===================================================================
@@ -2,6 +2,8 @@
// { dg-do compile }
// { dg-options "-O -g" }
+__extension__ typedef __SIZE_TYPE__ size_t;
+
struct DebugOnly {};
template <class T>
struct StripConst { typedef T result; };
@@ -93,7 +95,7 @@ struct AllocationSiteKey
unsigned offset : 24;
int kind;
typedef AllocationSiteKey Lookup;
- static unsigned hash (AllocationSiteKey key) { return (long
(key.script->code + key.offset)) ^ key.kind; }
+ static unsigned hash (AllocationSiteKey key) { return (size_t
(key.script->code + key.offset)) ^ key.kind; }
};
void
TypeCompartment::sweep (FreeOp *)
===================================================================
@@ -1,6 +1,7 @@
// PR c++/34965
// { dg-do compile }
// { dg-options "-O" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
int foo (int);
===================================================================
@@ -1,7 +1,8 @@
// PR c++/46538
// { dg-do compile }
// { dg-options "" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
S () : str(__PRETTY_FUNCTION__) {} // { dg-error "forbids
declaration" "decl" }
-// { dg-error "only constructors" "constructor" { target *-*-* } 5 }
+// { dg-error "only constructors" "constructor" { target *-*-* } 6 }
// { dg-prune-output "__PRETTY_FUNCTION__" }
===================================================================
@@ -1,6 +1,7 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-msse2" } */
/* { dg-require-effective-target sse2_runtime } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
#include <xmmintrin.h>
===================================================================
@@ -1,5 +1,6 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-msse2 -Wno-abi" } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
#include <emmintrin.h>
===================================================================
@@ -1,5 +1,6 @@
// PR c++/33844
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A {};
===================================================================
@@ -1,4 +1,5 @@
// PR c++/561
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
class A { };
===================================================================
@@ -1,5 +1,6 @@
// PR c++/31423
// { dg-options "" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
class C { public: C* f(); int get(); };
int f(C* p) { return p->f->get(); } // { dg-error "forget the
'\\(\\)'|base operand" }
===================================================================
@@ -1,5 +1,6 @@
// PR c++/51429
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A
{
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 28 Jan 2003 <nathan@codesourcery.com>
===================================================================
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct S
{
===================================================================
@@ -1,5 +1,6 @@
// PR c++/36405
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
#include <typeinfo>
===================================================================
@@ -1,4 +1,5 @@
// PR c++/49663
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct Nosm
{
===================================================================
@@ -1,7 +1,7 @@
// PR c++/47303
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
-
struct Z
{
void foo (int);
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 29 Dec 2001 <nathan@codesourcery.com>
===================================================================
@@ -1,4 +1,5 @@
// PR c++/47974
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
typedef double T;
===================================================================
@@ -1,4 +1,5 @@
// PR c++/51370
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A
{
===================================================================
@@ -1,4 +1,5 @@
// PR c++/21352
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct coperator_stack
{
===================================================================
@@ -1,4 +1,5 @@
// PR c++/26496
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template< typename _Generator> int generate_n(_Generator __gen);
struct Distribution { };
===================================================================
@@ -1,5 +1,6 @@
// PR c++/29225
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template <typename L, typename R> bool operator< (L x, R y);
struct T { int t (); };
===================================================================
@@ -1,5 +1,6 @@
// PR c++/27582
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A
{
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Copyright 2005 Free Software Foundation
// contributed by Alexandre Oliva <aoliva@redhat.com>
@@ -40,12 +41,12 @@ struct foo {
bind (&bar::baikt);
bind (&barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 42 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 43 }
bind (&foo::barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 44 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 45 }
bindm (&barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 47 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 48 }
bindm (&foo::barf);
bindn (&barf);
@@ -56,12 +57,12 @@ struct foo {
bind (&bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 58 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 59 }
bind (&bar::bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 60 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 61 }
bindm (&bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 63 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 64 }
bindm (&bar::bark);
bindn (&bark);
@@ -92,12 +93,12 @@ struct foo {
bind (&barT::baikt);
bind (&barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 94 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 95 }
bind (&foo::barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 96 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 97 }
bindm (&barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 99 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 100 }
bindm (&foo::barf);
bindn (&barf);
@@ -108,12 +109,12 @@ struct foo {
bind (&bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 110 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 111 }
bind (&barT::bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 112 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 113 }
bindm (&bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 115 }
+ // { dg-message "(candidate|deduce template parameter)"
"candidate note" { target *-*-* } 116 }
bindm (&barT::bark);
bindn (&bark);
===================================================================
@@ -1,4 +1,5 @@
// PR c++/40139
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template<int> struct A
{
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Origin: Jakub Jelinek <jakub@gcc.gnu.org>
// Wolfgang Bangerth <bangerth@ticam.utexas.edu>
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Origin: Giovanni Bajo <giovannibajo@libero.it>
===================================================================
@@ -1,4 +1,5 @@
// PR c++40342
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template <typename T1, typename T2> int f(T1 *, const T2 *); // {
dg-message "" }
template <typename T1, typename T2> int f(const T1 *, T2 *); // {
dg-message "" }
===================================================================
@@ -1,4 +1,5 @@
// PR c++/22621
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct foo {
typedef int (*fun)(int);
===================================================================
@@ -1,3 +1,4 @@
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Copyright (C) 2005 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 12 Oct 2005 <nathan@codesourcery.com>
===================================================================
@@ -1,4 +1,5 @@
// PR c++/43079
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct A {};
===================================================================
@@ -1,4 +1,5 @@
// Origin: Theo Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template <typename T,double (T::*fun)() const>
struct I {
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 24 Mar 2003 <nathan@codesourcery.com>
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Origin: <marco dot franzen at bigfoot dot com>
// PR c++/10126: Handle ptmf default conversions while matching a template
// argument
@@ -16,9 +17,9 @@ template <int (D::*fun)() const> int Get(); // { d
int main ()
{
Get<&B::I>(); // { dg-error "not a valid template argument" "not valid" }
- // { dg-error "no match" "no match" { target *-*-* } 18 }
- // { dg-message "note" "note" { target *-*-* } 18 }
+ // { dg-error "no match" "no match" { target *-*-* } 19 }
+ // { dg-message "note" "note" { target *-*-* } 19 }
Get<&D::I>(); // { dg-error "not a valid template argument" "not valid" }
- // { dg-error "no match" "no match" { target *-*-* } 21 }
- // { dg-message "note" "note" { target *-*-* } 21 }
+ // { dg-error "no match" "no match" { target *-*-* } 22 }
+ // { dg-message "note" "note" { target *-*-* } 22 }
}
===================================================================
@@ -1,5 +1,6 @@
// Origin: PR c++/46170
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
namespace util {
struct option_value {
===================================================================
@@ -1,4 +1,5 @@
// PR c++/48157
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct AType
{
===================================================================
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-options "-fpermissive" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
typedef long unsigned int size_t;
typedef bool _CORBA_Boolean;
typedef unsigned int _CORBA_ULong;
===================================================================
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
template <typename _Tp> _Tp *__addressof(_Tp &) {}
template <typename _Tp> class A {
public:
===================================================================
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-Wconversion -Wsign-conversion" } */
/* { dg-require-effective-target int32plus } */
+/* { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } } */
short mask1(short x)
{
short y = 0x7fff;
===================================================================
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-fpermissive" } */
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
template <class _Tp> class auto_ptr {}; /* { dg-warning "changes meaning" } */
template <class _Tp>
===================================================================
@@ -1,6 +1,7 @@
/* PR c/19978 : Test for duplicated warnings (unary operators). */
/* { dg-do compile } */
/* { dg-options "-Woverflow -ftrack-macro-expansion=0" } */
+/* { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } } */
#include <limits.h>
@@ -8,6 +9,6 @@ int
g (void)
{
return - - - - -INT_MIN; /* { dg-bogus "integer overflow in
expression.*integer overflow in expression" } */
- /* { dg-warning "integer overflow in expression" "" { target *-*-* } 10 } */
+ /* { dg-warning "integer overflow in expression" "" { target *-*-* } 11 } */
}
===================================================================
@@ -1,12 +1,13 @@
/* PR 30465 : Test for duplicated warnings in a conversion. */
/* { dg-do compile } */
/* { dg-options "-Woverflow" } */
+/* { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } } */
short int
g (void)
{
short int wc = ((short int)1 << 31) - 1; /* { dg-bogus "overflow .*
overflow" } */
- /* { dg-warning "overflow" "" { target *-*-* } 8 } */
+ /* { dg-warning "overflow" "" { target *-*-* } 9 } */
return wc;
}
===================================================================
@@ -2,7 +2,7 @@
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-fpermissive" } */
-
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
#include <limits.h>
enum e {
===================================================================
@@ -2,7 +2,7 @@
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-fpermissive -pedantic" } */
-
+/* { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } } */
#include <limits.h>
enum e {
===================================================================
@@ -2,7 +2,7 @@
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */
-
+/* { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } } */
#include <limits.h>
enum e {
===================================================================
@@ -1,5 +1,5 @@
// { dg-do compile }
-
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Origin: benko@sztaki.hu
// PR c++/10496: Incorrect pointer to member function diagnostics
===================================================================
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-options "-Wall" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Check that we don't warn about code that will not be executed.
extern int f2(int);
===================================================================
@@ -1,6 +1,6 @@
// { dg-do compile }
// { dg-options "-Wall" }
-
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
extern int f2(int);
extern void f3();
void
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
// 981203 bkoz
// g++/13908
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
// GROUPS passed initialization
// ARM $11.4: A function first declared in a friend decl is equivalent
// to an extern decl, so the below is illegal.
===================================================================
@@ -1,5 +1,6 @@
// { dg-do assemble }
// { dg-options "" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// GROUPS passed operators
// Check that the & operator, when applied to a global function
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
// GROUPS passed prefix-postfix
class foo {
public:
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
// GROUPS passed initialization
class foo {
public:
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// GROUPS passed pointers-to-members
class X {
private:
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// g++ 1.36.1 bug 900213_03
// g++ fails to detect an error when the address of a "bound" function is
===================================================================
@@ -1,4 +1,5 @@
// { dg-do run }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// g++ 1.36.1 bug 900220_01
// Ref: 12.8
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// GROUPS passed member-pointers error-reporting
struct Y
{
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// PRMS Id: 4484 (bug 3)
// Bug: g++ does implicitly take the address of methods passed to fns.
===================================================================
@@ -1,5 +1,6 @@
// { dg-do assemble }
// { dg-options "" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// PRMS Id: 4985
struct Thing {
@@ -16,4 +17,4 @@ static ThingEntry KeyWordTable[] = {
&Thing::FunctionA,
Thing::OverloadFn,
}; // { dg-error "assuming" "assuming" } implicit &
-// { dg-message "note" "note" { target *-*-* } 18 }
+// { dg-message "note" "note" { target *-*-* } 19 }
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// PRMS Id: 5656
// Bug: g++ tries (which is a bug) and fails (which is a bug) to initialize
// var at runtime.
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Bug: g++ allows two different meanings of a name in the same scope.
typedef int foo; // { dg-error "" }
===================================================================
@@ -1,4 +1,5 @@
// { dg-do run }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Testcase to make sure that synthesized methods are found when needed.
struct B { ~B() { } };
===================================================================
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
#include <typeinfo>
#include <iostream>
===================================================================
@@ -1,5 +1,6 @@
// { dg-do assemble }
// { dg-options "-ansi -Wall -pedantic" }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// GROUPS passed ARM-compliance
// arm file
// From: Olaf.Weber@cwi.nl
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
// GROUPS passed nest
// nest file
// From: gs4t@virginia.edu (Gnanasekaran Swaminathan)
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// GROUPS passed operators
// opr-eq file
// Message-Id: <9301141514.AA05925@mi.el.utwente.nl>
@@ -10,7 +11,7 @@ class B
{
public:
operator=(B &); // { dg-error "no type" }
- // { dg-message "B::operator=|no known conversion" "note" {
target *-*-* } 12 }
+ // { dg-message "B::operator=|no known conversion" "note" {
target *-*-* } 13 }
};
void
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
class foo_a {
protected:
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
class X;
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// prms-id: 11110
class data;
===================================================================
@@ -1,5 +1,6 @@
// { dg-do assemble }
// { dg-options "-Wno-deprecated -Wreturn-type" }
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
// GROUPS passed i960
/*
Bug Id: bnr
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
struct Fooey {
void f(char* pX);
void f(int in);
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Copyright (C) 1999 Free Software Foundation
@@ -14,7 +15,7 @@ struct foo {
-pedantic, even in bad1. */
int (*ok1)() = foo::bar;
void (foo::*bad1)(int) = foo::bar; // { dg-error "assuming pointer" }
-// { dg-message "note" "note" { target *-*-* } 16 }
+// { dg-message "note" "note" { target *-*-* } 17 }
int (*ok2)() = &foo::bar; // ok
void (*bad2)(int) = foo::bar; // { dg-error "no matches" }
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
//
// Copyright (C) 1999 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 27 Sep 1999 <nathan@acm.org>
===================================================================
@@ -1,4 +1,5 @@
// { dg-do run }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Test for proper handling of references to overloaded member functions.
struct A {
===================================================================
@@ -1,4 +1,6 @@
// { dg-do run }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
+
struct A {
A operator+ (int) const { return *this; }
};
===================================================================
@@ -1,4 +1,5 @@
// { dg-do run }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
class a {
public:
int f() { return 0; }
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// submitted by David C Binderman <dcb@pncl.co.uk>
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Submitted by Nathan Sidwell <nathan@acm.org>
// Bug: g++ was crashing after giving errors.
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Test for proper diagnostics on trying to take the address of a non-static
// member function.
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
//
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 14 Aug 2000 <nathan@codesourcery.com>
@@ -21,7 +22,7 @@ void A::foo ()
{
int (A::*ptr1) (int) = &A::ns;
int (A::*ptr2) (int) = A::ns; // { dg-error "pointer to
member" "err" }
- // { dg-message "pointer to member" "note" { target *-*-* } 23 }
+ // { dg-message "pointer to member" "note" { target *-*-* } 24 }
int (A::*ptr3) (int) = &ns; // { dg-error "pointer to
member" "err" }
int (A::*ptr4) (int) = ns; // { dg-error "pointer to
member" "err" }
===================================================================
@@ -1,4 +1,5 @@
// { dg-do link }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template<class T>
class foo {
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
//
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 11 Aug 2000 <nathan@codesourcery.com>
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// Origin: Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
struct H {
===================================================================
@@ -1,4 +1,6 @@
// { dg-do run }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
+
struct B {
int f(int) { return 1; }
};
===================================================================
@@ -1,4 +1,5 @@
// { dg-do run }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
class foo
{
public:
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
//
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 14 Aug 2000 <nathan@codesourcery.com>
===================================================================
@@ -1,4 +1,5 @@
// { dg-do link }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
template<class T,class T1>
int connect_to_method(T* receiver,
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions -pedantic" { target
*-*-mingw* } }
// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
// Reported against EGCS snaps 98/06/18.
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
class foo {
public:
===================================================================
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }
// check attempting to throw an overloaded function
struct A {