The simple code below fails to compile under 4.9.0 using the compilation 
command shown in the comment.

-------------------------------------------------
#include <iostream>
#include <condition_variable>

/* Compile with the command:
  *     x86_64-w64-mingw32-g++.exe   \
  *                 -D_WIN64    -Wall -Wextra -Werror \
  *                 -std=c++11  -O3   -static-libgcc  \
  *                 -static-libstdc++                 \
  *                 mt.cc -o mt.exe
  *
  * Compiler version:
  *      4.9.0 (x86_64-posix-seh-rev1, Built by MinGW-W64 project)
  *
  * Bug is invalid error message:
  *     mt.cc:25:7: error: array subscript is above array bounds 
[-Werror=array-bounds]
  */

#define EXPOSE_BUG
//#define KEEP_BUG_BUT_SUPPRESS_DETECTION

class c_common
{
    public:
       explicit c_common()
       {
#ifndef KEEP_BUG_BUT_SUPPRESS_DETECTION
           std::cout << "c_common created\n";
#endif
       }
       ~c_common(){ std::cout << "c_common destroyed\n"; }

       int  a{ 111 };
       std::condition_variable  cv_w2m[ 2 ];
#ifdef EXPOSE_BUG
       std::condition_variable  cv_m2w[ 2 ];
#endif
};

/*
Defining KEEP_BUG_BUT_SUPPRESS_DETECTION will retain the bug but 
suppress the error message;  un-defining both EXPOSE_BUG and 
KEEP_BUG_BUT_SUPPRESS_DETECTION will not trigger the bug.

Thanks,

--Suresh
*/

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to