public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ro at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/101747] Two-argument version of attribute malloc does not perform overload resolution
Date: Thu, 17 Nov 2022 10:23:30 +0000	[thread overview]
Message-ID: <bug-101747-4-3gQPeSHmu0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101747-4@http.gcc.gnu.org/bugzilla/>

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at gcc dot gnu.org

--- Comment #2 from Rainer Orth <ro at gcc dot gnu.org> ---
I've recently run into what seems to be the same issue, cf. GDB PR build/29791
for details: all of gdbsupport fails to compile with gcc 12.2.0 on Solaris like
this:

In file included from /usr/include/sys/time.h:448,
                 from ../gnulib/import/sys/time.h:39,
                 from /usr/include/sys/select.h:27,
                 from ../gnulib/import/sys/select.h:36,
                 from /usr/include/sys/types.h:665,
                 from ../gnulib/import/sys/types.h:39,
                 from ../gnulib/import/stdio.h:58,
                 from
/vol/src/gnu/gdb/hg/master/dist/gdbsupport/common-defs.h:86,
                 from /vol/src/gnu/gdb/hg/master/dist/gdbsupport/ptid.cc:20:
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f,
i)))
      |                                                                       
^
../gnulib/config.h:1693:72: note: use a cast to the expected type to
disambiguate
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous

The preprocessed testcase (not reduced) is attached to that PR:

  https://sourceware.org/bugzilla/show_bug.cgi?id=29791

Unfortunately, nobody has been able to determine yet where exactly the
ambiguity
lies, and unlike other cases, g++ doesn't show that.  Any suggestions on how to
proceed?

  parent reply	other threads:[~2022-11-17 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 11:49 [Bug c++/101747] New: " fweimer at redhat dot com
2021-08-03 20:27 ` [Bug c++/101747] " msebor at gcc dot gnu.org
2022-11-17 10:23 ` ro at gcc dot gnu.org [this message]
2022-12-28 19:57 ` pinskia at gcc dot gnu.org
2022-12-28 19:57 ` pinskia 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-101747-4-3gQPeSHmu0@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).