c++/6074: gcc snapshot 20020325 alias problem

qzb04471@nifty.ne.jp qzb04471@nifty.ne.jp
Wed Mar 27 17:26:00 GMT 2002


>Number:         6074
>Category:       c++
>Synopsis:       gcc snapshot 20020325 alias problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 27 15:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Yoshinori Sato
>Release:        gcc version 3.1 20020325 (prerelease)
>Organization:
>Environment:
linux-2.2.20
glibc-2.1.3
>Description:
It will become an error is compiled by c++.

$ h8300-elf-gcc -mh -mint32 -S -xc++ weak.c
weak.c:7: `void foo()' defined both normally and as an alias
weak.c:7: weak declaration of `void foo()' must precede definition

In C, it can compile normally.
$ h8300-elf-gcc -mh -mint32 -S -xc weak.c
no error.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="weak.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="weak.c"

I2lmIGRlZmluZWQoX19HTlVHX18pCmV4dGVybiAiQyIgewojZW5kaWYKZXh0ZXJuIHZvaWQgZm9v
KHZvaWQpOwoKdm9pZCAKZm9vKHZvaWQpIF9fYXR0cmlidXRlX18gKCh3ZWFrKSkgX19hdHRyaWJ1
dGVfXyAoKGFsaWFzICgiX19mb28iKSkpOwoKdm9pZCBfX2Zvbyh2b2lkKQp7Cn0KI2lmIGRlZmlu
ZWQoX19HTlVHX18pCn0KI2VuZGlmCg==



More information about the Gcc-bugs mailing list