public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-24 9:06 Mark Mitchell
0 siblings, 0 replies; 11+ messages in thread
From: Mark Mitchell @ 2002-04-24 9:06 UTC (permalink / raw)
To: jason; +Cc: gcc-prs
The following reply was made to PR c++/6331; it has been noted by GNATS.
From: Mark Mitchell <mark@codesourcery.com>
To: "jason@gcc.gnu.org" <jason@gcc.gnu.org>, "aj@suse.de" <aj@suse.de>,
"gcc-bugs@gcc.gnu.org" <gcc-bugs@gcc.gnu.org>,
"gcc-prs@gcc.gnu.org" <gcc-prs@gcc.gnu.org>,
"mmitchel@gcc.gnu.org" <mmitchel@gcc.gnu.org>,
"pmladek@suse.cz" <pmladek@suse.cz>, "pthomas@suse.de" <pthomas@suse.de>,
"schwab@suse.de" <schwab@suse.de>,
"gcc-gnats@gcc.gnu.org" <gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: c++/6331: g++ 3.1 looses const qualifiers
Date: Wed, 24 Apr 2002 08:55:26 -0700
--On Wednesday, April 24, 2002 09:05:06 AM +0000 "jason@gcc.gnu.org"
<jason@gcc.gnu.org> wrote:
> Synopsis: g++ 3.1 looses const qualifiers
>
> Responsible-Changed-From-To: mmitchel->jason
> Responsible-Changed-By: jason
> Responsible-Changed-When: Wed Apr 24 02:05:05 2002
> Responsible-Changed-Why:
> got the second bug
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gc
> c&pr=6331
Shucks, we were duplicating work; I was working on that too.
When I tried the change you made to build_modify_expr, I got a failure in
this g++.benjamin/14664-1.c, which tests that we cannot assign a string
literal to an array of characters (because the array of characters is
const). This is probably a goofy test; what shoudl be interesting is
whether we can assign the element types and it looks like the logic
for creating this test was that EDG issues an error -- but about array
assignment in general.
Anyhow, did you change the test, or did it still pass for you?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-25 1:27 jason
0 siblings, 0 replies; 11+ messages in thread
From: jason @ 2002-04-25 1:27 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, jason, pmladek, pthomas, schwab
Synopsis: g++ 3.1 looses const qualifiers
State-Changed-From-To: open->closed
State-Changed-By: jason
State-Changed-When: Thu Apr 25 01:27:46 2002
State-Changed-Why:
fixed
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6331
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-24 10:36 Jason Merrill
0 siblings, 0 replies; 11+ messages in thread
From: Jason Merrill @ 2002-04-24 10:36 UTC (permalink / raw)
To: jason; +Cc: gcc-prs
The following reply was made to PR c++/6331; it has been noted by GNATS.
From: Jason Merrill <jason@redhat.com>
To: Mark Mitchell <mark@codesourcery.com>
Cc: "gcc-bugs@gcc.gnu.org" <gcc-bugs@gcc.gnu.org>,
"gcc-gnats@gcc.gnu.org" <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/6331: g++ 3.1 looses const qualifiers
Date: Wed, 24 Apr 2002 18:27:15 +0100
I'll handle it.
Jason
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-24 10:36 Mark Mitchell
0 siblings, 0 replies; 11+ messages in thread
From: Mark Mitchell @ 2002-04-24 10:36 UTC (permalink / raw)
To: jason; +Cc: gcc-prs
The following reply was made to PR c++/6331; it has been noted by GNATS.
From: Mark Mitchell <mark@codesourcery.com>
To: Jason Merrill <jason@redhat.com>
Cc: "gcc-bugs@gcc.gnu.org" <gcc-bugs@gcc.gnu.org>,
"gcc-gnats@gcc.gnu.org" <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/6331: g++ 3.1 looses const qualifiers
Date: Wed, 24 Apr 2002 10:26:17 -0700
--On Wednesday, April 24, 2002 06:27:15 PM +0100 Jason Merrill
<jason@redhat.com> wrote:
> I'll handle it.
Thanks!
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-24 10:26 Mark Mitchell
0 siblings, 0 replies; 11+ messages in thread
From: Mark Mitchell @ 2002-04-24 10:26 UTC (permalink / raw)
To: jason; +Cc: gcc-prs
The following reply was made to PR c++/6331; it has been noted by GNATS.
From: Mark Mitchell <mark@codesourcery.com>
To: Jason Merrill <jason@redhat.com>
Cc: "gcc-bugs@gcc.gnu.org" <gcc-bugs@gcc.gnu.org>,
"gcc-gnats@gcc.gnu.org" <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/6331: g++ 3.1 looses const qualifiers
Date: Wed, 24 Apr 2002 10:21:16 -0700
> The original bug report that the testcase is derived from complained about
> the error; the customer said that either the extension should be dropped
> or the testcase should be accepted. Neither of those came to pass.
>
> I wouldn't object to making the pedwarn unconditional.
I agree; let's just kill this extension -- it is totally undocumented,
and provides no real power since memcpy/loops do the same thing.
Do you have time to make that change, or do you want me to do it?
Thanks,
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-24 10:26 Jason Merrill
0 siblings, 0 replies; 11+ messages in thread
From: Jason Merrill @ 2002-04-24 10:26 UTC (permalink / raw)
To: jason; +Cc: gcc-prs
The following reply was made to PR c++/6331; it has been noted by GNATS.
From: Jason Merrill <jason@redhat.com>
To: Mark Mitchell <mark@codesourcery.com>
Cc: "gcc-bugs@gcc.gnu.org" <gcc-bugs@gcc.gnu.org>,
"gcc-gnats@gcc.gnu.org" <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/6331: g++ 3.1 looses const qualifiers
Date: Wed, 24 Apr 2002 18:18:04 +0100
>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:
> Shucks, we were duplicating work; I was working on that too.
Oops. I was guessing that you hadn't started on it yet.
> When I tried the change you made to build_modify_expr, I got a failure in
> this g++.benjamin/14664-1.c, which tests that we cannot assign a string
> literal to an array of characters (because the array of characters is
> const). This is probably a goofy test; what should be interesting is
> whether we can assign the element types and it looks like the logic
> for creating this test was that EDG issues an error -- but about array
> assignment in general.
I agree.
> Anyhow, did you change the test, or did it still pass for you?
Neither; I failed to notice the failure in my testrun. Double oops.
The original bug report that the testcase is derived from complained about
the error; the customer said that either the extension should be dropped or
the testcase should be accepted. Neither of those came to pass.
I wouldn't object to making the pedwarn unconditional.
Jason
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-24 2:05 jason
0 siblings, 0 replies; 11+ messages in thread
From: jason @ 2002-04-24 2:05 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, jason, mmitchel, pmladek, pthomas, schwab
Synopsis: g++ 3.1 looses const qualifiers
Responsible-Changed-From-To: mmitchel->jason
Responsible-Changed-By: jason
Responsible-Changed-When: Wed Apr 24 02:05:05 2002
Responsible-Changed-Why:
got the second bug
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6331
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-23 15:24 schwab
0 siblings, 0 replies; 11+ messages in thread
From: schwab @ 2002-04-23 15:24 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, mmitchel, pmladek, pthomas, schwab
Synopsis: g++ 3.1 looses const qualifiers
State-Changed-From-To: closed->open
State-Changed-By: schwab
State-Changed-When: Tue Apr 23 15:24:15 2002
State-Changed-Why:
Still not fixed
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6331
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-23 1:43 mmitchel
0 siblings, 0 replies; 11+ messages in thread
From: mmitchel @ 2002-04-23 1:43 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, mmitchel, pmladek, pthomas, schwab
Synopsis: g++ 3.1 looses const qualifiers
State-Changed-From-To: analyzed->closed
State-Changed-By: mmitchel
State-Changed-When: Tue Apr 23 01:43:04 2002
State-Changed-Why:
Fixed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6331
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-22 11:14 mmitchel
0 siblings, 0 replies; 11+ messages in thread
From: mmitchel @ 2002-04-22 11:14 UTC (permalink / raw)
To: aj, gcc-bugs, gcc-prs, mmitchel, nobody, pmladek, pthomas, schwab
Synopsis: g++ 3.1 looses const qualifiers
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-By: mmitchel
Responsible-Changed-When: Mon Apr 22 11:14:09 2002
Responsible-Changed-Why:
Working on fix.
State-Changed-From-To: open->analyzed
State-Changed-By: mmitchel
State-Changed-When: Mon Apr 22 11:14:09 2002
State-Changed-Why:
Confirmed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6331
^ permalink raw reply [flat|nested] 11+ messages in thread
* c++/6331: g++ 3.1 looses const qualifiers
@ 2002-04-17 2:46 pthomas
0 siblings, 0 replies; 11+ messages in thread
From: pthomas @ 2002-04-17 2:46 UTC (permalink / raw)
To: gcc-gnats; +Cc: aj, pmladek
>Number: 6331
>Category: c++
>Synopsis: g++ 3.1 looses const qualifiers
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Apr 17 02:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Philipp Thomas, SuSE Linux Ag
>Release: 3.1
>Organization:
>Environment:
suse-linux-gnu
>Description:
Gcc rejects the attached code, stating that the conversion is illegal. Output of 'c++ -v -c gcc31_bug_const.cc' is:
Using built-in specs.
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared i486-suse-linux
Thread model: posix
gcc version 3.1 20020408 (prerelease)
/usr/lib/gcc-lib/i486-suse-linux/3.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i486__ gcc31_bug_const.cc -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase gcc31_bug_const.cc -version -fmessage-length=0 -o /tmp/ccVQg0M0.s
GNU CPP version 3.1 20020408 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20020408 (prerelease) (i486-suse-linux)
compiled by GNU C version 3.1 20020408 (prerelease).
ignoring nonexistent directory "/usr/i486-suse-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/g++
/usr/include/g++/i486-suse-linux
/usr/include/g++/backward
/usr/local/include
/usr/lib/gcc-lib/i486-suse-linux/3.1/include
/usr/include
End of search list.
gcc31_bug_const.cc: In member function `int Collision::automatic_shift()':
gcc31_bug_const.cc:38: invalid conversion from `int (*)(int* const&, int* const&)' to `int (*)(int*&, int*&)'
gcc31_bug_const.cc:38: initializing argument 1 of `void Link_array<T>::sort(int (*)(T*&, T*&), int, int) [with T = int]'
gcc31_bug_const.cc: In member function `void Link_array<T>::sort(int (*)(T*&, T*&), int, int) [with T = int]':
gcc31_bug_const.cc:38: instantiated from here
gcc31_bug_const.cc:29: invalid conversion from `int (*)(int* const&, int* const&)' to `int (*)(int*&, int*&)'
gcc31_bug_const.cc:29: initializing argument 1 of `void Link_array<T>::sort(int (*)(T*&, T*&), int, int) [with T = int]'
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="gcc31_bug_const.cc"
Content-Disposition: inline; filename="gcc31_bug_const.cc"
template<class T>
class Link_array
{
public:
Link_array () {}
Link_array (Link_array<T> const &src) {}
// quicksort.
void sort (int (*compare) (T *const&,T *const&),
int lower = -1, int upper = -1);
};
class Note_column
{
public:
static int shift_compare (int *const &, int *const &) {};
};
class Collision // interface
{
public:
int automatic_shift ();
};
template<class T> void
Link_array<T>::sort (int (*compare) (T *const&,T *const&),
int lower, int upper)
{
int last = lower;
sort (compare, lower, last-1);
}
int
Collision::automatic_shift ()
{
int d = 1;
Link_array<int> clashes;
clashes.sort (Note_column::shift_compare);
return 1;
}
int main()
{
return 0;
}
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2002-04-25 8:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-24 9:06 c++/6331: g++ 3.1 looses const qualifiers Mark Mitchell
-- strict thread matches above, loose matches on Subject: below --
2002-04-25 1:27 jason
2002-04-24 10:36 Mark Mitchell
2002-04-24 10:36 Jason Merrill
2002-04-24 10:26 Mark Mitchell
2002-04-24 10:26 Jason Merrill
2002-04-24 2:05 jason
2002-04-23 15:24 schwab
2002-04-23 1:43 mmitchel
2002-04-22 11:14 mmitchel
2002-04-17 2:46 pthomas
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).