This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] PR 50810 (new try)


On Mon, Oct 24, 2011 at 2:05 PM, Jason Merrill <jason@redhat.com> wrote:
> On 10/24/2011 02:47 PM, Gabriel Dos Reis wrote:
>>
>> What about (testcase)
>>
>> ? ? ?int f(char);
>> ? ? ?double f(...);
>>
>> ? ? ?const int n = sizeof f({257});
>>
>> ?
>
> The narrowing conversion would be marked as 'bad' and therefore the second
> overload chosen. ?As before, the objective is to only change the diagnostic,
> not the meaning of valid code.
>

OK.  I think we may need better documentation of the behavior.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]