public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/47232] New: Confusing ObjC error message "attributes may not be specified before before ‘class’"
@ 2011-01-09 14:34 nicola at gcc dot gnu.org
  2011-01-09 14:46 ` [Bug objc/47232] " nicola at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: nicola at gcc dot gnu.org @ 2011-01-09 14:34 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Confusing ObjC error message "attributes may not be
                    specified before before ‘class’"
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: objc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nicola@gcc.gnu.org


The following ObjC testcase:

__attribute__ ((deprecated)) @class A;

triggers the error

test5.m:1:30: error: attributes may not be specified before before ‘class’

which is clumsy.  It is due to c-parser.c producing the error "attributes may
not be specified before" which is then joined with "before 'class'".

Thanks


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

* [Bug objc/47232] Confusing ObjC error message "attributes may not be specified before before ‘class’"
  2011-01-09 14:34 [Bug objc/47232] New: Confusing ObjC error message "attributes may not be specified before before ‘class’" nicola at gcc dot gnu.org
@ 2011-01-09 14:46 ` nicola at gcc dot gnu.org
  2011-01-09 15:31 ` nicola at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: nicola at gcc dot gnu.org @ 2011-01-09 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

Nicola Pero <nicola at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.09 14:21:22
     Ever Confirmed|0                           |1

--- Comment #1 from Nicola Pero <nicola at gcc dot gnu.org> 2011-01-09 14:21:22 UTC ---
I was looking at the other parser messages; maybe we could simply replace
"attributes may not be specified before" with "unexpected attribute".

Then, the error message would become

 unexpected attribute before 'class'

which is quite consistent with the other error messages.

Thanks


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

* [Bug objc/47232] Confusing ObjC error message "attributes may not be specified before before ‘class’"
  2011-01-09 14:34 [Bug objc/47232] New: Confusing ObjC error message "attributes may not be specified before before ‘class’" nicola at gcc dot gnu.org
  2011-01-09 14:46 ` [Bug objc/47232] " nicola at gcc dot gnu.org
@ 2011-01-09 15:31 ` nicola at gcc dot gnu.org
  2011-01-09 23:05 ` nicola at gcc dot gnu.org
  2011-01-09 23:07 ` nicola at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: nicola at gcc dot gnu.org @ 2011-01-09 15:31 UTC (permalink / raw)
  To: gcc-bugs

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

Nicola Pero <nicola at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |nicola at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.6.0


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

* [Bug objc/47232] Confusing ObjC error message "attributes may not be specified before before ‘class’"
  2011-01-09 14:34 [Bug objc/47232] New: Confusing ObjC error message "attributes may not be specified before before ‘class’" nicola at gcc dot gnu.org
  2011-01-09 14:46 ` [Bug objc/47232] " nicola at gcc dot gnu.org
  2011-01-09 15:31 ` nicola at gcc dot gnu.org
@ 2011-01-09 23:05 ` nicola at gcc dot gnu.org
  2011-01-09 23:07 ` nicola at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: nicola at gcc dot gnu.org @ 2011-01-09 23:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Nicola Pero <nicola at gcc dot gnu.org> 2011-01-09 22:47:27 UTC ---
Author: nicola
Date: Sun Jan  9 22:47:22 2011
New Revision: 168619

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168619
Log:
In gcc/:
2011-01-09  Nicola Pero  <nicola.pero@meta-innovation.com>

    PR objc/47232
    * c-parser.c (c_parser_declaration_or_fndef): Improved
    error message.

In gcc/testsuite/:
2011-01-09  Nicola Pero  <nicola.pero@meta-innovation.com>

    PR objc/47232
    * objc.dg/attributes/invalid-attribute-1.m: New.
    * obj-c++.dg/attributes/invalid-attribute-1.mm: New.    

Added:
    trunk/gcc/testsuite/obj-c++.dg/attributes/invalid-attribute-1.mm
    trunk/gcc/testsuite/objc.dg/attributes/invalid-attribute-1.m
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-parser.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug objc/47232] Confusing ObjC error message "attributes may not be specified before before ‘class’"
  2011-01-09 14:34 [Bug objc/47232] New: Confusing ObjC error message "attributes may not be specified before before ‘class’" nicola at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-01-09 23:05 ` nicola at gcc dot gnu.org
@ 2011-01-09 23:07 ` nicola at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: nicola at gcc dot gnu.org @ 2011-01-09 23:07 UTC (permalink / raw)
  To: gcc-bugs

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

Nicola Pero <nicola at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to work|                            |4.6.0
         Resolution|                            |FIXED

--- Comment #3 from Nicola Pero <nicola at gcc dot gnu.org> 2011-01-09 22:48:51 UTC ---
Fixed in trunk (4.6.0).

Thanks


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

end of thread, other threads:[~2011-01-09 22:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-09 14:34 [Bug objc/47232] New: Confusing ObjC error message "attributes may not be specified before before ‘class’" nicola at gcc dot gnu.org
2011-01-09 14:46 ` [Bug objc/47232] " nicola at gcc dot gnu.org
2011-01-09 15:31 ` nicola at gcc dot gnu.org
2011-01-09 23:05 ` nicola at gcc dot gnu.org
2011-01-09 23:07 ` nicola at gcc dot gnu.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).