public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nicolas.werner at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/100135] [modules] ICE when using constants in a module
Date: Thu, 05 Oct 2023 20:51:07 +0000	[thread overview]
Message-ID: <bug-100135-4-gacGNB6LJz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100135-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100135

--- Comment #2 from Nicolas Werner <nicolas.werner at hotmail dot de> ---
Possibly the gcc behaviour here is correct. There is a clang bug open for it
not rejecting calls to functions with default parameters, when the default
parameter is not exported: https://github.com/llvm/llvm-project/issues/57459

However possibly that should only be an error at the call site instead of when
compiling the module with that function declaration, when the function
parameter can be legally specified at the call site. For example for foo(int i
= unexported_constant) a call to foo(5) could be legal, even if only foo but
not unexported_constant is exported? Not sure what the standard says on that,
it sounds similar to CWG2631.

  parent reply	other threads:[~2023-10-05 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18  9:56 [Bug c++/100135] New: ICE when using constants in a mdoule patrick.kox at commandoregel dot be
2023-10-05 20:28 ` [Bug c++/100135] [modules] ICE when using constants in a module nicolas.werner at hotmail dot de
2023-10-05 20:51 ` nicolas.werner at hotmail dot de [this message]
2024-03-06 20:16 ` ppalka at gcc dot gnu.org

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=bug-100135-4-gacGNB6LJz@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).