public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jennifer Yao <jenny.hyphen.fa@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Enable libstdc++ numeric conversions on Cygwin
Date: Thu, 12 Nov 2015 17:25:00 -0000	[thread overview]
Message-ID: <CAPQfdhnXQqZGypLpfnr19eYDMU7j+nhQTu1g=kCmfnAKxA9zeQ@mail.gmail.com> (raw)
In-Reply-To: <20151112145015.GD2937@redhat.com>

> On 12/11/15 13:39 +0000, Jonathan Wakely wrote:
>>
>> One downside of this change is that we introduce some (hopefully safe)
>> ODR violations, where inline functions and templates that depend on
>> _GLIBCXX_USE_C99_FOO might now be defined differently in C++98 and
>> C++11 code. Previously they had the same definition, even though in
>> C++11 mode the value of the _GLIBCXX_USE_C99_FOO macro might have been
>> sub-optimal (i.e. the C99 features were usable, but the macro said
>> they weren't). Those ODR violatiosn could be avoided if needed, by
>> always using the _GLIBCXX98_USE_C99_FOO macro in code that can be
>> included from either C++98 or C++11. We could still use the
>> _GLIBCXX11_USE_C99_FOO macro in pure C++11 code (such as the numeric
>> conversion functions) and get most of the benefit of this change.
>
>
> This patch (relative to the previous one) would avoid the ODR
> problems, by only using the C++98 macro in code that gets used in
> C++98 and later, and using the _GLIBCXX11_XXX ones in code that is
> never compiled as C++98 (specifically, the numeric conversion
> functions).
>
> Maybe this is a safer, more conservative change.

I haven't tested either of your patches yet (the testsuite runs
reeeeally slowly on Cygwin T___T), but I just wanted to express my
approval of the proposed changes (more specifically, the second patch
you posted).

Also, I was not aware that we had to worry about C++03 compatibility.
Sounds tedious.

  reply	other threads:[~2015-11-12 17:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 15:19 Jennifer Yao
     [not found] ` <CAPQfdhmMGJeb-tq29jTheoo5jUaeiFzcycWFTrpShRE-kPftGw@mail.gmail.com>
2015-09-18 15:51   ` Fwd: " Jonathan Wakely
2015-09-19 21:00     ` Jennifer Yao
2015-09-21 12:37       ` Jonathan Wakely
     [not found]   ` <CAPQfdh=uOjLzi60Dnd0Dd1ycJUDqMWQBCv1aRAGBP97DSUS3+Q@mail.gmail.com>
     [not found]     ` <20151112114049.GY2937@redhat.com>
2015-11-12 13:40       ` Jonathan Wakely
2015-11-12 14:50         ` Jonathan Wakely
2015-11-12 17:25           ` Jennifer Yao [this message]
2015-11-12 17:56             ` Jonathan Wakely
2015-11-12 22:56         ` Andreas Tobler
2015-11-13 14:52         ` Jonathan Wakely
2015-11-14  8:37           ` Christophe Lyon
2015-11-14 13:58             ` Jonathan Wakely
2015-11-14 21:23               ` Jennifer Yao
2015-11-15 21:38                 ` Jennifer Yao
2015-11-16  9:48                   ` Jonathan Wakely
2015-11-14 16:32             ` Jonathan Wakely
2015-11-15  8:58               ` Christophe Lyon
2015-11-15 11:14                 ` Jonathan Wakely
2015-11-15 16:25                   ` Christophe Lyon
2015-12-08 10:59           ` Alan Lawrence

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPQfdhnXQqZGypLpfnr19eYDMU7j+nhQTu1g=kCmfnAKxA9zeQ@mail.gmail.com' \
    --to=jenny.hyphen.fa@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).