public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/65128] New: remove "linux" and "unix" from preprocessor macros from cpp-5
@ 2015-02-20  1:15 shawn at churchofgit dot com
  2015-02-20  1:38 ` [Bug preprocessor/65128] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: shawn at churchofgit dot com @ 2015-02-20  1:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65128

            Bug ID: 65128
           Summary: remove "linux" and "unix" from preprocessor macros
                    from cpp-5
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shawn at churchofgit dot com

I just spent like a whole hour until I realized that cpp defines "linux" which
gives this confusing error:

src/systemctl/bootspec.h:40:15: error: expected identifier or ‘(’ before
numeric constant
         char *linux;
               ^
We should remove these defines from gcc 5, and force programs to check __unix__
and __linux__
>From gcc-bugs-return-477862-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Feb 20 01:15:53 2015
Return-Path: <gcc-bugs-return-477862-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25552 invoked by alias); 20 Feb 2015 01:15:52 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 25467 invoked by uid 48); 20 Feb 2015 01:15:49 -0000
From: "lukeallardyce at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65127] internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'addr_expr' in parsing_nsdmi, at cp/parser.c:18311
Date: Fri, 20 Feb 2015 01:15:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: lukeallardyce at gmail 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:
Message-ID: <bug-65127-4-qE7GOHbTx2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65127-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65127-4@http.gcc.gnu.org/bugzilla/>
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-02/txt/msg02195.txt.bz2
Content-length: 183

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide127

--- Comment #1 from Luke Allardyce <lukeallardyce at gmail dot com> ---
Sorry, make_item() should be template<int sz> make_item()


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug preprocessor/65128] remove "linux" and "unix" from preprocessor macros from cpp-5
  2015-02-20  1:15 [Bug preprocessor/65128] New: remove "linux" and "unix" from preprocessor macros from cpp-5 shawn at churchofgit dot com
@ 2015-02-20  1:38 ` pinskia at gcc dot gnu.org
  2015-02-20  7:44 ` [Bug target/65128] " rguenth at gcc dot gnu.org
  2015-02-27 20:39 ` shawn at churchofgit dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-20  1:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65128

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
bcc76966 (ghazi         2003-11-29 03:08:13 +0000  45)  builtin_define_std
("linux");                           \
bcc76966 (ghazi         2003-11-29 03:08:13 +0000  46)  builtin_define_std
("unix");                            \


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/65128] remove "linux" and "unix" from preprocessor macros from cpp-5
  2015-02-20  1:15 [Bug preprocessor/65128] New: remove "linux" and "unix" from preprocessor macros from cpp-5 shawn at churchofgit dot com
  2015-02-20  1:38 ` [Bug preprocessor/65128] " pinskia at gcc dot gnu.org
@ 2015-02-20  7:44 ` rguenth at gcc dot gnu.org
  2015-02-27 20:39 ` shawn at churchofgit dot com
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-20  7:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65128

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |*-*-linux, *-*-unix,
                   |                            |*-*-sun
          Component|preprocessor                |target

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
They are indeed legacy defines.  More affected systems:

dragonfly.h:       builtin_define_std ("unix");         \
freebsd-spec.h: builtin_define_std ("unix");                                  
\
gnu.h:  builtin_define_std ("unix");            \
kfreebsd-gnu.h: builtin_define_std ("unix");            \
knetbsd-gnu.h:  builtin_define_std ("unix");            \
kopensolaris-gnu.h:     builtin_define_std ("unix");            \
linux.h:        builtin_define_std ("linux");                           \
linux.h:        builtin_define_std ("unix");                            \
sol2.h: builtin_define_std ("unix");                    \
sol2.h: builtin_define_std ("sun");                     \


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/65128] remove "linux" and "unix" from preprocessor macros from cpp-5
  2015-02-20  1:15 [Bug preprocessor/65128] New: remove "linux" and "unix" from preprocessor macros from cpp-5 shawn at churchofgit dot com
  2015-02-20  1:38 ` [Bug preprocessor/65128] " pinskia at gcc dot gnu.org
  2015-02-20  7:44 ` [Bug target/65128] " rguenth at gcc dot gnu.org
@ 2015-02-27 20:39 ` shawn at churchofgit dot com
  2 siblings, 0 replies; 4+ messages in thread
From: shawn at churchofgit dot com @ 2015-02-27 20:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65128

--- Comment #3 from Shawn Landden <shawn at churchofgit dot com> ---
Created attachment 34892
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34892&action=edit
remove legacy includes


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-27 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20  1:15 [Bug preprocessor/65128] New: remove "linux" and "unix" from preprocessor macros from cpp-5 shawn at churchofgit dot com
2015-02-20  1:38 ` [Bug preprocessor/65128] " pinskia at gcc dot gnu.org
2015-02-20  7:44 ` [Bug target/65128] " rguenth at gcc dot gnu.org
2015-02-27 20:39 ` shawn at churchofgit dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).