This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] Fix for PR c++/19076 and PR c++/6628
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Douglas Gregor <dgregor at cs dot indiana dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com, jason at redhat dot com
- Date: 22 Feb 2005 01:08:34 +0100
- Subject: Re: [C++ Patch] Fix for PR c++/19076 and PR c++/6628
- Organization: Integrable Solutions
- References: <200501222253.46148.dgregor@cs.indiana.edu>
Douglas Gregor <dgregor@cs.indiana.edu> writes:
[...]
| However, one cannot add qualifiers to a function type. For instance,
| the second line of the following code does not add qualifiers to
| "foo":
|
| typedef int foo(float) const;
| typedef volatile foo foo_v; // #2
GCC has an extension whereby
volatile foo F;
is legal and means that "F" cannot return. How does your patch
interact with that extension?
| In C++98, the line marked #2 is an error. However, DR 295 makes this
| code legal but drops the qualifiers, so "foo_v" will be the same type
| as "foo". The patch therefore warns only when -pedantic is provided.
-- Gaby