public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manus at eiffel dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/18411] Warning not legitimate
Date: Wed, 10 Nov 2004 01:25:00 -0000	[thread overview]
Message-ID: <20041110012458.31001.qmail@sourceware.org> (raw)
In-Reply-To: <20041109232340.18411.manus@eiffel.com>


------- Additional Comments From manus at eiffel dot com  2004-11-10 01:24 -------
I believe we do not have the right definition of unspecified behavior. Going 
back to my initial post:

extern void f();

void g(char a) {
  ((void (*) (char)) f)(a);
}

Knowing that actually `f' has been declared in some other module as:
extern void f(char){...}

Then the above code "((void (*) (char)) f)(a);" make sense. I'm simply calling 
`f' with the right type for the argument thanks to the function cast.

Could you point out where the undefined part is?

Thanks,
Manu

PS: sorry to be so picky on this issue but I feel it is important.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18411


  parent reply	other threads:[~2004-11-10  1:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-09 23:23 [Bug c/18411] New: " manus at eiffel dot com
2004-11-09 23:29 ` [Bug c/18411] " pinskia at gcc dot gnu dot org
2004-11-09 23:32 ` manus at eiffel dot com
2004-11-09 23:34 ` manus at eiffel dot com
2004-11-09 23:48 ` joseph at codesourcery dot com
2004-11-09 23:51 ` pinskia at gcc dot gnu dot org
2004-11-10  0:42 ` manus at eiffel dot com
2004-11-10  0:48 ` pinskia at gcc dot gnu dot org
2004-11-10  0:59 ` manus at eiffel dot com
2004-11-10  1:15 ` joseph at codesourcery dot com
2004-11-10  1:25 ` manus at eiffel dot com [this message]
2004-11-10  1:26 ` pinskia at gcc dot gnu dot org
2004-11-10  1:41 ` joseph at codesourcery dot com
2004-11-11 20:04 ` manus at eiffel dot com
2005-07-04  1:38 ` SebastianR at gmx dot de

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=20041110012458.31001.qmail@sourceware.org \
    --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).