public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: dgillies@graviton.com To: gcc-gnats@gcc.gnu.org Subject: c++/4494: Possible problem with compiler warnings on main() Date: Sun, 07 Oct 2001 01:16:00 -0000 [thread overview] Message-ID: <20011007080638.23804.qmail@sourceware.cygnus.com> (raw) >Number: 4494 >Category: c++ >Synopsis: Possible problem with compiler warnings on main() >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sun Oct 07 01:16:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: dgillies@graviton.com <Donald W. Gillies> >Release: gcc version 2.95.2 19991024 (release) >Organization: >Environment: FreeBSD >Description: typedef int int_t; int_t main() { } g++ -pedantic-errors -W -Wimplicit -Wreturn-type -Wswitch -Wunused -Wall -Wshad\ ow -Wpointer-arith -Wcast-qual -Wcast-align -Waggregate-return -Wstrict-prototy\ pes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Werror -Wuni\ nitialized -Wbad-function-cast -Wwrite-strings -O2 -DNDEBUG -ggdb3 -DTARGET_IS_\ test.c:113: return type for `main' changed to `int' ============================== the G++ compiler gives this error, when I have main() returning a typedef'd int. I do not think this should be even a warning. I am using no native types in my software system, because I want to be able to port my software easily. However, -Wmain will always complain that "main" has a suspicious type. However, there is nothing suspicious about a type of "int" which happens to be a typedef. - Don Gillies >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="none" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="none"
next reply other threads:[~2001-10-07 1:16 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-10-07 1:16 dgillies [this message] 2002-09-15 15:42 nathan
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=20011007080638.23804.qmail@sourceware.cygnus.com \ --to=dgillies@graviton.com \ --cc=gcc-gnats@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: linkBe 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).