Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 21 Feb 2023 14:45:28 -0500
From: Jeffrey Walton <noloader@...il.com>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] Use __builtin_FILE/__builtin_LINE if available

On Sat, Feb 18, 2023 at 7:17 AM Jon Chesterfield
<jonathanchesterfield@...il.com> wrote:
>
> On Sat, 18 Feb 2023, 02:54 Fangrui Song, <i@...kray.me> wrote:
>
> On Fri, Feb 17, 2023 at 6:03 PM Rich Felker <dalias@...c.org> wrote:
> >
> > On Fri, Feb 17, 2023 at 05:33:33PM -0800, Fangrui Song wrote:
> > > C++ inline functions are requred to have exact same sequence of tokens
> > > in every translation unit, but __FILE__ and __LINE__ may expand to
> > > different tokens. The ODR violatioin is usually benign, but it can lead
> > > to errors when C++20 modules are used.
>
> It is sad that C++ modules broke 'assert' but not surprising. Modules were largely created out of aversion to macros. This isn't something libc can fix though, I suggest a defect report against C++ instead.

Somewhat related, I tried contacting the C/C++ committee to have
concerns addressed several years ago. I was not able to reach the
committee. There's no mailing list or discussion group available to
the public at large. It looks like one of those groups where the
committee only talks with the companies that build compilers.
Outsiders (like compiler users) are not welcomed.

> Changing the semantics of assert in C seems like a bad thing to do.

++

Jeff

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.