Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"I may kid around about drugs, but really, I take them seriously." -- Doctor Graper


devel / comp.lang.c++ / Re: typedef structures broken

SubjectAuthor
* typedef structures brokenMalcolm McLean
+- Re: typedef structures brokenBonita Montero
+* Re: typedef structures brokenKeith Thompson
|`- Re: typedef structures brokenMalcolm McLean
`* Re: typedef structures brokenDavid Brown
 `- Re: typedef structures brokenMalcolm McLean

1
typedef structures broken

<222d1ba1-131d-4d6a-89f6-ddbd2082db01n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=959&group=comp.lang.c%2B%2B#959

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a37:5ac1:0:b0:762:43ce:68a0 with SMTP id o184-20020a375ac1000000b0076243ce68a0mr7012qkb.7.1690014078363;
Sat, 22 Jul 2023 01:21:18 -0700 (PDT)
X-Received: by 2002:a05:6870:5b34:b0:1b0:60ff:b748 with SMTP id
ds52-20020a0568705b3400b001b060ffb748mr5431220oab.3.1690014077775; Sat, 22
Jul 2023 01:21:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Sat, 22 Jul 2023 01:21:17 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:6412:8be1:ce0b:af65;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:6412:8be1:ce0b:af65
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <222d1ba1-131d-4d6a-89f6-ddbd2082db01n@googlegroups.com>
Subject: typedef structures broken
From: malcolm.arthur.mclean@gmail.com (Malcolm McLean)
Injection-Date: Sat, 22 Jul 2023 08:21:18 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1260
 by: Malcolm McLean - Sat, 22 Jul 2023 08:21 UTC

Windows Visual C++ is now rejecting typedefed structures without tags.

e.g the following code

typedef struct
{ double x;
double y;
} Point;

clang still accepts it.

Anyone more information on this?

Re: typedef structures broken

<u9g70k$3otl1$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=960&group=comp.lang.c%2B%2B#960

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: typedef structures broken
Date: Sat, 22 Jul 2023 11:20:23 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <u9g70k$3otl1$1@dont-email.me>
References: <222d1ba1-131d-4d6a-89f6-ddbd2082db01n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 22 Jul 2023 09:20:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b6114a3f4692fe67f4d329876e1b7ab5";
logging-data="3962529"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/KRaXfg9lQxAhhiS5Z0lH05rHneMtKaY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:vNx1WMcS+TAjLuLqUXPOK1LqGPY=
Content-Language: de-DE
In-Reply-To: <222d1ba1-131d-4d6a-89f6-ddbd2082db01n@googlegroups.com>
 by: Bonita Montero - Sat, 22 Jul 2023 09:20 UTC

Am 22.07.2023 um 10:21 schrieb Malcolm McLean:
> Windows Visual C++ is now rejecting typedefed structures without tags.
>
> e.g the following code
>
> typedef struct
> {
> double x;
> double y;
> } Point;

I can compile this with current MSVC and -std:C++14, -std:C++17
and -std:C++20.

Re: typedef structures broken

<87wmysmdhp.fsf@nosuchdomain.example.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=961&group=comp.lang.c%2B%2B#961

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c++
Subject: Re: typedef structures broken
Date: Sat, 22 Jul 2023 03:45:06 -0700
Organization: None to speak of
Lines: 21
Message-ID: <87wmysmdhp.fsf@nosuchdomain.example.com>
References: <222d1ba1-131d-4d6a-89f6-ddbd2082db01n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="bdab44af2cb9f73f4bd721fa6db5fe3e";
logging-data="3978180"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18XwGompFvusdsXuDQIx/WA"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:21kdqdBLez3fiBtzIocdmIYuHI8=
sha1:6ARh0jYIjOs8+qlF4E9jwABoJJ0=
 by: Keith Thompson - Sat, 22 Jul 2023 10:45 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
> Windows Visual C++ is now rejecting typedefed structures without tags.
>
> e.g the following code
>
> typedef struct
> {
> double x;
> double y;
> } Point;
>
> clang still accepts it.
>
> Anyone more information on this?

What's the error message?

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: typedef structures broken

<12fb1738-87cc-4098-a3dc-b5cecf636679n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=962&group=comp.lang.c%2B%2B#962

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:622a:1486:b0:403:b707:400f with SMTP id t6-20020a05622a148600b00403b707400fmr9133qtx.7.1690024884783;
Sat, 22 Jul 2023 04:21:24 -0700 (PDT)
X-Received: by 2002:a05:620a:6404:b0:767:27e1:fcce with SMTP id
pz4-20020a05620a640400b0076727e1fccemr9323qkn.0.1690024884575; Sat, 22 Jul
2023 04:21:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Sat, 22 Jul 2023 04:21:24 -0700 (PDT)
In-Reply-To: <87wmysmdhp.fsf@nosuchdomain.example.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:6412:8be1:ce0b:af65;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:6412:8be1:ce0b:af65
References: <222d1ba1-131d-4d6a-89f6-ddbd2082db01n@googlegroups.com> <87wmysmdhp.fsf@nosuchdomain.example.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <12fb1738-87cc-4098-a3dc-b5cecf636679n@googlegroups.com>
Subject: Re: typedef structures broken
From: malcolm.arthur.mclean@gmail.com (Malcolm McLean)
Injection-Date: Sat, 22 Jul 2023 11:21:24 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1910
 by: Malcolm McLean - Sat, 22 Jul 2023 11:21 UTC

On Saturday, 22 July 2023 at 11:45:23 UTC+1, Keith Thompson wrote:
> Malcolm McLean <malcolm.ar...@gmail.com> writes:
> > Windows Visual C++ is now rejecting typedefed structures without tags.
> >
> > e.g the following code
> >
> > typedef struct
> > {
> > double x;
> > double y;
> > } Point;
> >
> > clang still accepts it.
> >
> > Anyone more information on this?
> What's the error message?
>
>
It broke on an Azure build.
(Azure is a system which hosts compilers in the cloud. I develop on the Mac then submit
the programs. Azure builds a Windows compatible version. But I can't easily regenerate
the error message.) It was something like struct tag missing.

Re: typedef structures broken

<u9gtrt$3s62g$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=963&group=comp.lang.c%2B%2B#963

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.brown@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++
Subject: Re: typedef structures broken
Date: Sat, 22 Jul 2023 17:50:21 +0200
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <u9gtrt$3s62g$1@dont-email.me>
References: <222d1ba1-131d-4d6a-89f6-ddbd2082db01n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 22 Jul 2023 15:50:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7a0dc6fe92d784eba5f7902c738a1d66";
logging-data="4069456"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uye6iGd9WyJ7IcYWxaaZuJdY6qnkm7GE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:hBGqhTvaN4c2xPrre4TLiMBtqe0=
In-Reply-To: <222d1ba1-131d-4d6a-89f6-ddbd2082db01n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Sat, 22 Jul 2023 15:50 UTC

On 22/07/2023 10:21, Malcolm McLean wrote:
> Windows Visual C++ is now rejecting typedefed structures without tags.
>
> e.g the following code
>
> typedef struct
> {
> double x;
> double y;
> } Point;
>
> clang still accepts it.
>
> Anyone more information on this?

Pasting it into godbolt and testing with the latest MSVC does not
complain. But I don't know the command-line switches involved.

Perhaps you have particular switches that make it reject this, even
though it is valid code (AFAIK) ?

Re: typedef structures broken

<b48ff76a-4a05-41d7-bc8f-f35fa53772a1n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=964&group=comp.lang.c%2B%2B#964

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a37:5ac1:0:b0:767:e785:1c30 with SMTP id o184-20020a375ac1000000b00767e7851c30mr21277qkb.1.1690043699878;
Sat, 22 Jul 2023 09:34:59 -0700 (PDT)
X-Received: by 2002:a05:6830:1da7:b0:6b9:c180:ffac with SMTP id
z7-20020a0568301da700b006b9c180ffacmr3317606oti.1.1690043699547; Sat, 22 Jul
2023 09:34:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Sat, 22 Jul 2023 09:34:59 -0700 (PDT)
In-Reply-To: <u9gtrt$3s62g$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:6412:8be1:ce0b:af65;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:6412:8be1:ce0b:af65
References: <222d1ba1-131d-4d6a-89f6-ddbd2082db01n@googlegroups.com> <u9gtrt$3s62g$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b48ff76a-4a05-41d7-bc8f-f35fa53772a1n@googlegroups.com>
Subject: Re: typedef structures broken
From: malcolm.arthur.mclean@gmail.com (Malcolm McLean)
Injection-Date: Sat, 22 Jul 2023 16:34:59 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2408
 by: Malcolm McLean - Sat, 22 Jul 2023 16:34 UTC

On Saturday, 22 July 2023 at 16:50:40 UTC+1, David Brown wrote:
> On 22/07/2023 10:21, Malcolm McLean wrote:
> > Windows Visual C++ is now rejecting typedefed structures without tags.
> >
> > e.g the following code
> >
> > typedef struct
> > {
> > double x;
> > double y;
> > } Point;
> >
> > clang still accepts it.
> >
> > Anyone more information on this?
> Pasting it into godbolt and testing with the latest MSVC does not
> complain. But I don't know the command-line switches involved.
>
> Perhaps you have particular switches that make it reject this, even
> though it is valid code (AFAIK) ?
>
With Azure pipelines the pipeline is usually set up by other people who
choose the compiler version and the flags. This avoids a situation in which
a developer sets various esoteric options on his desktop and creates an
executable, which can't be replicated by anyone else. But the disadvantage is
that you don't actually know how it's been set up.

But something has gone wrong. I cut and pasted C circle drawing code into a .cpp
file. And it rejected the typedef. When I converted the structure to the C++
idomatic form ( struct MyStructure { }; ), it was accepted.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor