public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35578]  New: Error about misplaced 'friend' word is issued on a wrong line
@ 2008-03-13 22:23 yuri at tsoft dot com
  2008-03-29 17:44 ` [Bug c++/35578] [4.2/4.3/4.4 regression] " reichelt at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: yuri at tsoft dot com @ 2008-03-13 22:23 UTC (permalink / raw)
  To: gcc-bugs

When I compile the code below I get:
x.C:3: error: 'friend' used outside of class
And 'friend' word is on the line #5.

=== code begins ===
int i() {
  return (0);
} /*here an error is reported*/

friend void x() {
}


-- 
           Summary: Error about misplaced 'friend' word is issued on a wrong
                    line
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yuri at tsoft dot com


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


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

* [Bug c++/35578] [4.2/4.3/4.4 regression] Error about misplaced 'friend' word is issued on a wrong line
  2008-03-13 22:23 [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line yuri at tsoft dot com
@ 2008-03-29 17:44 ` reichelt at gcc dot gnu dot org
  2008-03-29 17:57 ` reichelt at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-29 17:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from reichelt at gcc dot gnu dot org  2008-03-29 17:43 -------
Confiremd. This happens since GCC 4.2.0.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
      Known to fail|                            |4.2.0
      Known to work|                            |4.1.2
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-29 17:43:57
               date|                            |
            Summary|Error about misplaced       |[4.2/4.3/4.4 regression]
                   |'friend' word is issued on a|Error about misplaced
                   |wrong line                  |'friend' word is issued on a
                   |                            |wrong line
   Target Milestone|---                         |4.2.4


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


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

* [Bug c++/35578] [4.2/4.3/4.4 regression] Error about misplaced 'friend' word is issued on a wrong line
  2008-03-13 22:23 [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line yuri at tsoft dot com
  2008-03-29 17:44 ` [Bug c++/35578] [4.2/4.3/4.4 regression] " reichelt at gcc dot gnu dot org
@ 2008-03-29 17:57 ` reichelt at gcc dot gnu dot org
  2008-03-30 22:03 ` reichelt at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-29 17:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from reichelt at gcc dot gnu dot org  2008-03-29 17:57 -------
Testing a patch.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |reichelt at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-03-29 17:43:57         |2008-03-29 17:57:16
               date|                            |


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


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

* [Bug c++/35578] [4.2/4.3/4.4 regression] Error about misplaced 'friend' word is issued on a wrong line
  2008-03-13 22:23 [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line yuri at tsoft dot com
  2008-03-29 17:44 ` [Bug c++/35578] [4.2/4.3/4.4 regression] " reichelt at gcc dot gnu dot org
  2008-03-29 17:57 ` reichelt at gcc dot gnu dot org
@ 2008-03-30 22:03 ` reichelt at gcc dot gnu dot org
  2008-03-30 22:08 ` [Bug c++/35578] [4.2/4.3 " reichelt at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-30 22:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from reichelt at gcc dot gnu dot org  2008-03-30 22:02 -------
Subject: Bug 35578

Author: reichelt
Date: Sun Mar 30 22:02:06 2008
New Revision: 133738

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133738
Log:
        PR c++/35578
        * parser.c (cp_parser_decl_specifier_seq): Add location to error
        message.

        * g++.dg/parse/friend8.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/parse/friend8.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/35578] [4.2/4.3 regression] Error about misplaced 'friend' word is issued on a wrong line
  2008-03-13 22:23 [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line yuri at tsoft dot com
                   ` (2 preceding siblings ...)
  2008-03-30 22:03 ` reichelt at gcc dot gnu dot org
@ 2008-03-30 22:08 ` reichelt at gcc dot gnu dot org
  2008-03-31  9:40 ` [Bug c++/35578] [4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-30 22:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from reichelt at gcc dot gnu dot org  2008-03-30 22:08 -------
Fixed on mainline.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|4.1.2                       |4.1.2 4.4.0
            Summary|[4.2/4.3/4.4 regression]    |[4.2/4.3 regression] Error
                   |Error about misplaced       |about misplaced 'friend'
                   |'friend' word is issued on a|word is issued on a wrong
                   |wrong line                  |line


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


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

* [Bug c++/35578] [4.2/4.3 Regression] Error about misplaced 'friend' word is issued on a wrong line
  2008-03-13 22:23 [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line yuri at tsoft dot com
                   ` (3 preceding siblings ...)
  2008-03-30 22:08 ` [Bug c++/35578] [4.2/4.3 " reichelt at gcc dot gnu dot org
@ 2008-03-31  9:40 ` rguenth at gcc dot gnu dot org
  2008-05-11 19:34 ` reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-31  9:40 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.2.0                       |4.2.0 4.3.0
           Priority|P3                          |P2
            Summary|[4.2/4.3 regression] Error  |[4.2/4.3 Regression] Error
                   |about misplaced 'friend'    |about misplaced 'friend'
                   |word is issued on a wrong   |word is issued on a wrong
                   |line                        |line


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


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

* [Bug c++/35578] [4.2/4.3 Regression] Error about misplaced 'friend' word is issued on a wrong line
  2008-03-13 22:23 [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line yuri at tsoft dot com
                   ` (4 preceding siblings ...)
  2008-03-31  9:40 ` [Bug c++/35578] [4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
@ 2008-05-11 19:34 ` reichelt at gcc dot gnu dot org
  2008-05-11 19:36 ` reichelt at gcc dot gnu dot org
  2008-05-11 19:37 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-05-11 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from reichelt at gcc dot gnu dot org  2008-05-11 19:33 -------
Subject: Bug 35578

Author: reichelt
Date: Sun May 11 19:32:51 2008
New Revision: 135181

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135181
Log:
        PR c++/35578
        * parser.c (cp_parser_decl_specifier_seq): Add location to error
        message.

        * g++.dg/parse/friend8.C: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/parse/friend8.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/parser.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/35578] [4.2/4.3 Regression] Error about misplaced 'friend' word is issued on a wrong line
  2008-03-13 22:23 [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line yuri at tsoft dot com
                   ` (5 preceding siblings ...)
  2008-05-11 19:34 ` reichelt at gcc dot gnu dot org
@ 2008-05-11 19:36 ` reichelt at gcc dot gnu dot org
  2008-05-11 19:37 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-05-11 19:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from reichelt at gcc dot gnu dot org  2008-05-11 19:36 -------
Subject: Bug 35578

Author: reichelt
Date: Sun May 11 19:35:20 2008
New Revision: 135182

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135182
Log:
        PR c++/35578
        * parser.c (cp_parser_decl_specifier_seq): Add location to error
        message.

        * g++.dg/parse/friend8.C: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/parse/friend8.C
Modified:
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/parser.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/35578] [4.2/4.3 Regression] Error about misplaced 'friend' word is issued on a wrong line
  2008-03-13 22:23 [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line yuri at tsoft dot com
                   ` (6 preceding siblings ...)
  2008-05-11 19:36 ` reichelt at gcc dot gnu dot org
@ 2008-05-11 19:37 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-05-11 19:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from reichelt at gcc dot gnu dot org  2008-05-11 19:37 -------
Now also fixed on the 4.3 and 4.2 branch.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2008-05-11 19:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-13 22:23 [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line yuri at tsoft dot com
2008-03-29 17:44 ` [Bug c++/35578] [4.2/4.3/4.4 regression] " reichelt at gcc dot gnu dot org
2008-03-29 17:57 ` reichelt at gcc dot gnu dot org
2008-03-30 22:03 ` reichelt at gcc dot gnu dot org
2008-03-30 22:08 ` [Bug c++/35578] [4.2/4.3 " reichelt at gcc dot gnu dot org
2008-03-31  9:40 ` [Bug c++/35578] [4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
2008-05-11 19:34 ` reichelt at gcc dot gnu dot org
2008-05-11 19:36 ` reichelt at gcc dot gnu dot org
2008-05-11 19:37 ` reichelt 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).