Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #82972

Re: Understanding default member initializers of constructorless structs

From Juha Nieminen <nospam@thanks.invalid>
Newsgroups comp.lang.c++
Subject Re: Understanding default member initializers of constructorless structs
Date 2022-02-08 12:37 +0000
Organization Aioe.org NNTP Server
Message-ID <stto70$106i$1@gioia.aioe.org> (permalink)
References <sttgpr$1cud$1@gioia.aioe.org> <stti72$hp4$1@dont-email.me>

Show all headers | View raw


Alf P. Steinbach <alf.p.steinbach@gmail.com> wrote:
>> warning: missing initializer for member 'S3::b'
> 
> It looks like a warning without name, so can't be turned off?

No, I just copied the relevant part of the warning for brevity. The full
line is:

test.cc:12:19: warning: missing initializer for member 'S3::b' [-Wmissing-field-initializers]
   12 |     S3 s3 = { 400 };
      |                   ^

Back to comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Understanding default member initializers of constructorless structs Juha Nieminen <nospam@thanks.invalid> - 2022-02-08 10:31 +0000
  Re: Understanding default member initializers of constructorless structs "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-02-08 11:55 +0100
    Re: Understanding default member initializers of constructorless structs Juha Nieminen <nospam@thanks.invalid> - 2022-02-08 12:37 +0000
      Re: Understanding default member initializers of constructorless structs red floyd <no.spam.here@its.invalid> - 2022-02-08 10:56 -0800
  Re: Understanding default member initializers of constructorless structs Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-02-08 07:29 -0800
    Re: Understanding default member initializers of constructorless structs Juha Nieminen <nospam@thanks.invalid> - 2022-02-09 07:26 +0000

csiph-web