mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jon Chesterfield <>
Subject: Re: [musl] [PATCH] Use __builtin_FILE/__builtin_LINE if available
Date: Sat, 18 Feb 2023 12:17:03 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

On Sat, 18 Feb 2023, 02:54 Fangrui Song, <> wrote:

On Fri, Feb 17, 2023 at 6:03 PM Rich Felker <> 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.

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


[-- Attachment #2: Type: text/html, Size: 1236 bytes --]

  reply	other threads:[~2023-02-18 12:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-18  1:33 Fangrui Song
2023-02-18  2:03 ` Rich Felker
2023-02-18  2:53   ` Fangrui Song
2023-02-18 12:17     ` Jon Chesterfield [this message]
2023-02-21 19:09       ` Fangrui Song
2023-02-27 22:26         ` Szabolcs Nagy
2023-03-02  8:19           ` Fangrui Song
     [not found]           ` <>
2023-03-05  3:23             ` Zhihao Yuan
2023-02-21 19:45       ` Jeffrey Walton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).