From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6812 invoked by alias); 20 Jul 2015 08:00:45 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6756 invoked by uid 48); 20 Jul 2015 08:00:40 -0000 From: "noloader at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66943] New: GCC warns of Unknown Pragma for OpenMP, even though it support it. Date: Mon, 20 Jul 2015 08:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: noloader at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg01696.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66943 Bug ID: 66943 Summary: GCC warns of Unknown Pragma for OpenMP, even though it support it. Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: noloader at gmail dot com Target Milestone: --- The following source code results in a slew of Unknown Pragma messages. The problem is, GCC supports OpenMP. GCC responds properly to -fopenmp, and even defines _OPENMP when it encounters -fopenmp. This is related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431, and managing warnings with pragmas when using -Wall. The relation to 53431 is: I can't seem to get "pragma GCC diagnostic" to work to ignore the warnings when -Wall is in effect. // Defines GCC_DIAGNOSTIC_AWARE if GCC 4.7 or above. #define GCC_DIAGNOSTIC_AWARE 1 #if GCC_DIAGNOSTIC_AWARE # pragma GCC diagnostic ignored "-Wunknown-pragmas" #endif ... Integer ModularRoot(const Integer &a, const Integer &dp, const Integer &dq, const Integer &p, const Integer &q, const Integer &u) { Integer p2, q2; #pragma omp parallel #pragma omp sections { #pragma omp section p2 = ModularExponentiation((a % p), dp, p); #pragma omp section q2 = ModularExponentiation((a % q), dq, q); } return CRT(p2, p, q2, q, u); } ... ********** To duplicate: git clone https://github.com/weidai11/cryptopp.git cryptopp-warn cd cryptopp-warn export CXXFLAGS="-g2 -O3 -DNDEBUG -Wall" make