public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-)
@ 2004-11-28  0:44 reichelt at gcc dot gnu dot org
  2004-11-28  0:48 ` [Bug c++/18698] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-11-28  0:44 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet causes a strange error message:

===================================
template<int> struct A
{
    ::A~();
};
===================================

  bug.cc:3: error: using-declaration for non-member at class scope
                   ^^^^^^^^^^^^^^^^^
  bug.cc:3: error: expected ';' before '~' token

This was introduced in gcc 3.4.0. With gcc 3.3.5 I get

  bug.cc:3: error: invalid use of template-name 'A' in a declarator
  bug.cc:3: error: syntax error before `~' token

which makes more sense.

-- 
           Summary: [3.4/4.0 regression] Error message using "using" for
                    code not using "using" ;-)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/18698] [3.4/4.0 regression] Error message using "using" for code not using "using" ;-)
  2004-11-28  0:44 [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) reichelt at gcc dot gnu dot org
@ 2004-11-28  0:48 ` pinskia at gcc dot gnu dot org
  2004-12-23 15:34 ` lerdsuwa at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-28  0:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-28 00:48 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-28 00:48:19
               date|                            |
   Target Milestone|---                         |3.4.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/18698] [3.4/4.0 regression] Error message using "using" for code not using "using" ;-)
  2004-11-28  0:44 [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) reichelt at gcc dot gnu dot org
  2004-11-28  0:48 ` [Bug c++/18698] " pinskia at gcc dot gnu dot org
@ 2004-12-23 15:34 ` lerdsuwa at gcc dot gnu dot org
  2005-01-21  8:15 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-12-23 15:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-12-23 15:34 -------
The error message shows 'using-declaration' while it
is actually an 'access-declaration' (section 11.3 in 
the standard).

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/18698] [3.4/4.0 regression] Error message using "using" for code not using "using" ;-)
  2004-11-28  0:44 [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) reichelt at gcc dot gnu dot org
  2004-11-28  0:48 ` [Bug c++/18698] " pinskia at gcc dot gnu dot org
  2004-12-23 15:34 ` lerdsuwa at gcc dot gnu dot org
@ 2005-01-21  8:15 ` pinskia at gcc dot gnu dot org
  2005-01-21  8:17 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-21  8:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-21 08:14 -------
(In reply to comment #2)
> The error message shows 'using-declaration' while it
> is actually an 'access-declaration' (section 11.3 in 
> the standard).

But it looks like GCC does not differentiate between them when reporting a bug.

Also shouldn't we warn about access-declaration as they are deprecated?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/18698] [3.4/4.0 regression] Error message using "using" for code not using "using" ;-)
  2004-11-28  0:44 [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-01-21  8:15 ` pinskia at gcc dot gnu dot org
@ 2005-01-21  8:17 ` pinskia at gcc dot gnu dot org
  2005-05-19 17:49 ` [Bug c++/18698] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-21  8:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-21 08:16 -------
(In reply to comment #3)
> But it looks like GCC does not differentiate between them when reporting a bug.
s/bug/error/

A way to have GCC to differeentiate them is to add an argument to do_class_using_decl.
And pass that code in parser for "Access declaration" is for "Access declaration" and not for 
using-declaration.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/18698] [3.4/4.0/4.1 regression] Error message using "using" for code not using "using" ;-)
  2004-11-28  0:44 [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-01-21  8:17 ` pinskia at gcc dot gnu dot org
@ 2005-05-19 17:49 ` mmitchel at gcc dot gnu dot org
  2005-06-17 11:26 ` redi at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:49 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.4                       |3.4.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/18698] [3.4/4.0/4.1 regression] Error message using "using" for code not using "using" ;-)
  2004-11-28  0:44 [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-05-19 17:49 ` [Bug c++/18698] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2005-06-17 11:26 ` redi at gcc dot gnu dot org
  2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
  2005-09-27 16:24 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu dot org @ 2005-06-17 11:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From redi at gcc dot gnu dot org  2005-06-17 11:26 -------
Not sure if this is the same bug or if it should be a new PR:

struct A {
    NS::y<A> b;
};

gives the same "using-declaration" diagnostic if compiled with -DNS= or
-DNS=std, but not otherwise.

This can be caused simply by failing to declare NS::y, e.g. by forgetting to
include a header.  The diagnostic is pretty unhelpful.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |redi at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/18698] [3.4/4.0/4.1 regression] Error message using "using" for code not using "using" ;-)
  2004-11-28  0:44 [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-06-17 11:26 ` redi at gcc dot gnu dot org
@ 2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
  2005-09-27 16:24 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-22 21:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-22 21:13 -------
Moving to 4.0.2 pre Mark.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.5                       |4.0.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/18698] [3.4/4.0/4.1 regression] Error message using "using" for code not using "using" ;-)
  2004-11-28  0:44 [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
@ 2005-09-27 16:24 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:24 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.2                       |4.0.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18698


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-09-27 16:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-28  0:44 [Bug c++/18698] New: [3.4/4.0 regression] Error message using "using" for code not using "using" ;-) reichelt at gcc dot gnu dot org
2004-11-28  0:48 ` [Bug c++/18698] " pinskia at gcc dot gnu dot org
2004-12-23 15:34 ` lerdsuwa at gcc dot gnu dot org
2005-01-21  8:15 ` pinskia at gcc dot gnu dot org
2005-01-21  8:17 ` pinskia at gcc dot gnu dot org
2005-05-19 17:49 ` [Bug c++/18698] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-06-17 11:26 ` redi at gcc dot gnu dot org
2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
2005-09-27 16:24 ` mmitchel at gcc dot gnu dot org

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).