From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19446 invoked by alias); 12 Aug 2013 16:24:28 -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 19222 invoked by uid 48); 12 Aug 2013 16:24:25 -0000 From: "sbergman at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58138] New: #include gives warning: macro "__code_model_small__" is not used Date: Mon, 12 Aug 2013 16:24: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.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sbergman at redhat dot com X-Bugzilla-Status: UNCONFIRMED 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 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: 2013-08/txt/msg00654.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58138 Bug ID: 58138 Summary: #include gives warning: macro "__code_model_small__" is not used Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sbergman at redhat dot com At least with a trunk revision 201654 (aka LATEST-4.9) build (on Fedora 18 x86_64): > $ cat test1.cc > #include > namespace {} > $ ~/gcc/LATEST-4.9/inst/bin/g++ -std=gnu++11 -Wunused-macros -c test1.cc > test1.cc:2:12: warning: macro "__code_model_small__" is not used [-Wunused-macros] > namespace {} > ^ I was able to strip that down to the following excerpt of ~/gcc/LATEST-4.9/inst/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include/ia32intrin.h: > $ cat test2.cc > #include "test2.h" > namespace {} > $ cat test2.h > #pragma GCC system_header > #pragma GCC push_options > #pragma GCC target("sse4.2") > #pragma GCC pop_options > $ ~/gcc/LATEST-4.9/inst/bin/g++ -Wunused-macros -c test2.cc test2.cc:2:12: warning: macro "__code_model_small__" is not used [-Wunused-macros] > namespace {} > ^ With a build of tags/gcc_4_8_1_release, compiling test1.cc does not give a warning while test2.cc does. And with a random old build of branches/gcc-4_6-branch, compiling neither test1.cc nor test2.cc gives a warning (replacing -std=gnu++11 with -std=gnu++0x when compiling test1.cc).