From: "Singh, Mithun" <mithun.singh@Wabtec.com>
To: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Compiler error when using typedef void as function parameter with gcc 4.4.2
Date: Thu, 9 Feb 2023 14:07:09 +0000 [thread overview]
Message-ID: <DS7PR07MB83501B0D1C14FBB409C2166BE5D99@DS7PR07MB8350.namprd07.prod.outlook.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]
Hello,
I have typedef void as follows in one of my header files:
typedef void VOID;
And I am using this typedef as function parameter as follows:
VOID someFunction(VOID);
This code compiles fine with gcc 3.3.5, but when I compile it with gcc 4.4.2, I get following error:
error: '<anonymous>' has incomplete type
error: invalid use of 'VOID'
Will you please shed some light on why would it not work with gcc 4.4.2?
Thanks,
Mithun
This email and any attachments are only for use by the intended recipient(s) and may contain legally privileged, confidential, proprietary or otherwise private information. Any unauthorized use, reproduction, dissemination, distribution or other disclosure of the contents of this e-mail or its attachments is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original. Neither this information block, the typed name of the sender, nor anything else in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.
next reply other threads:[~2023-02-09 14:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 14:07 Singh, Mithun [this message]
2023-02-09 14:27 ` Jonathan Wakely
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=DS7PR07MB83501B0D1C14FBB409C2166BE5D99@DS7PR07MB8350.namprd07.prod.outlook.com \
--to=mithun.singh@wabtec.com \
--cc=gcc-help@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).