public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4494: Possible problem with compiler warnings on main()
@ 2002-09-15 15:42 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-09-15 15:42 UTC (permalink / raw)
To: dgillies, gcc-bugs, gcc-prs, nobody
Synopsis: Possible problem with compiler warnings on main()
State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Sun Sep 15 15:42:17 2002
State-Changed-Why:
confirmed
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4494
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/4494: Possible problem with compiler warnings on main()
@ 2001-10-07 1:16 dgillies
0 siblings, 0 replies; 2+ messages in thread
From: dgillies @ 2001-10-07 1:16 UTC (permalink / raw)
To: gcc-gnats
>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"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-15 22:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-15 15:42 c++/4494: Possible problem with compiler warnings on main() nathan
-- strict thread matches above, loose matches on Subject: below --
2001-10-07 1:16 dgillies
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).