On 10 November 2011 20:17, Jason Merrill wrote:
> On 11/10/2011 03:10 PM, Jason Merrill wrote:
>>
>> On 11/10/2011 02:48 PM, Jonathan Wakely wrote:
>>>
>>> +warn_missing_meminits (tree type, tree cons)
>>> +{
>>> + tree mem_inits = sort_mem_initializers (type, NULL_TREE);
>>> + while (mem_inits)
>>
On 11/10/2011 03:10 PM, Jason Merrill wrote:
On 11/10/2011 02:48 PM, Jonathan Wakely wrote:
+warn_missing_meminits (tree type, tree cons)
+{
+ tree mem_inits = sort_mem_initializers (type, NULL_TREE);
+ while (mem_inits)
+ {
+ tree member = TREE_PURPOSE (mem_inits);
+ /* TODO do not warn if brac
On 11/10/2011 02:48 PM, Jonathan Wakely wrote:
+warn_missing_meminits (tree type, tree cons)
+{
+ tree mem_inits = sort_mem_initializers (type, NULL_TREE);
+ while (mem_inits)
+{
+ tree member = TREE_PURPOSE (mem_inits);
+ /* TODO do not warn if brace-or-equal-initializer */
+
On 7 November 2011 21:47, Jason Merrill wrote:
> On 11/07/2011 04:43 PM, Jonathan Wakely wrote:
>>
>> Unfortunately this doesn't work very well in C++11 mode, as defaulted
>> constructors don't cause warnings when they should do e.g.
>
> Maybe check this in defaulted_late_check?
I tried that (atta
On Mon, Nov 7, 2011 at 4:39 PM, Jason Merrill wrote:
> On 11/07/2011 05:38 PM, Gabriel Dos Reis wrote:
>>>
>>> struct C
>>> {
>>> int i;
>>> C() = default;
>>> };
>>
>> so the defaulted constructor does not initialize C::i?
>
> No, it doesn't. value-initialization of a C will initialize it, but
On 7 November 2011 22:38, Gabriel Dos Reis wrote:
>> Unfortunately this doesn't work very well in C++11 mode, as defaulted
>> constructors don't cause warnings when they should do e.g.
>>
>> struct C
>> {
>> int i;
>> C() = default;
>> };
>>
>> This doesn't produce the same warning as C() {} even
On 11/07/2011 05:38 PM, Gabriel Dos Reis wrote:
struct C
{
int i;
C() = default;
};
so the defaulted constructor does not initialize C::i?
No, it doesn't. value-initialization of a C will initialize it, but not
default-initialization.
Jason
On Mon, Nov 7, 2011 at 3:43 PM, Jonathan Wakely wrote:
> This is a new version of my -Wmeminit patch, first posted to PR c++/2972.
>
> Jason suggested combining the Wmeminit warning with the adjacent
> Weffc++ one which I agree with. The advice in the Effective C++ book
> actually says not to lea
On 11/07/2011 04:43 PM, Jonathan Wakely wrote:
Unfortunately this doesn't work very well in C++11 mode, as defaulted
constructors don't cause warnings when they should do e.g.
Maybe check this in defaulted_late_check?
Jason
This is a new version of my -Wmeminit patch, first posted to PR c++/2972.
Jason suggested combining the Wmeminit warning with the adjacent
Weffc++ one which I agree with. The advice in the Effective C++ book
actually says not to leave members uninitialized, rather than saying
*all* members must h
10 matches
Mail list logo