public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/67432] New: Improve error message on empty enum
@ 2015-09-02  7:19 chengniansun at gmail dot com
  2015-09-02 14:39 ` [Bug c/67432] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: chengniansun at gmail dot com @ 2015-09-02  7:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67432

            Bug ID: 67432
           Summary: Improve error message on empty enum
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengniansun at gmail dot com
  Target Milestone: ---

IMHO, it would be better to improve the error message on empty enumeration.  

$: cat t.c
enum E {};
$: gcc-trunk -c t.c
t.c:1:9: error: expected identifier before ‘}’ token
 enum E {};
         ^
$: clang-trunk -c t.c
t.c:1:9: error: use of empty enum
enum E {};
        ^
1 error generated.
$
>From gcc-bugs-return-496140-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Sep 02 07:44:51 2015
Return-Path: <gcc-bugs-return-496140-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 127603 invoked by alias); 2 Sep 2015 07:44:51 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 127585 invoked by uid 48); 2 Sep 2015 07:44:47 -0000
From: "xuejuncao at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/67433] New: ?: expresion returns unexpected value when condition is a bool variable and it's value above 1
Date: Wed, 02 Sep 2015 07:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: xuejuncao at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-67433-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg00118.txt.bz2
Content-length: 487

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg433

            Bug ID: 67433
           Summary: ?: expresion returns unexpected value when condition
                    is a bool variable and it's value above 1
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xuejuncao at gmail dot com
  Target Milestone: ---


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

* [Bug c/67432] Improve error message on empty enum
  2015-09-02  7:19 [Bug c/67432] New: Improve error message on empty enum chengniansun at gmail dot com
@ 2015-09-02 14:39 ` mpolacek at gcc dot gnu.org
  2015-09-02 21:01 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-09-02 14:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67432

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-09-02
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |6.0
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


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

* [Bug c/67432] Improve error message on empty enum
  2015-09-02  7:19 [Bug c/67432] New: Improve error message on empty enum chengniansun at gmail dot com
  2015-09-02 14:39 ` [Bug c/67432] " mpolacek at gcc dot gnu.org
@ 2015-09-02 21:01 ` mpolacek at gcc dot gnu.org
  2015-09-02 21:01 ` mpolacek at gcc dot gnu.org
  2015-09-02 21:25 ` chengniansun at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-09-02 21:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67432

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Done.


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

* [Bug c/67432] Improve error message on empty enum
  2015-09-02  7:19 [Bug c/67432] New: Improve error message on empty enum chengniansun at gmail dot com
  2015-09-02 14:39 ` [Bug c/67432] " mpolacek at gcc dot gnu.org
  2015-09-02 21:01 ` mpolacek at gcc dot gnu.org
@ 2015-09-02 21:01 ` mpolacek at gcc dot gnu.org
  2015-09-02 21:25 ` chengniansun at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-09-02 21:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67432

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Sep  2 21:00:38 2015
New Revision: 227421

URL: https://gcc.gnu.org/viewcvs?rev=227421&root=gcc&view=rev
Log:
        PR c/67432
        * c-parser.c (c_parser_enum_specifier): Give a better error for
        an empty enum.

        * gcc.dg/pr67432.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr67432.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-parser.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c/67432] Improve error message on empty enum
  2015-09-02  7:19 [Bug c/67432] New: Improve error message on empty enum chengniansun at gmail dot com
                   ` (2 preceding siblings ...)
  2015-09-02 21:01 ` mpolacek at gcc dot gnu.org
@ 2015-09-02 21:25 ` chengniansun at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: chengniansun at gmail dot com @ 2015-09-02 21:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67432

--- Comment #4 from Chengnian Sun <chengniansun at gmail dot com> ---
(In reply to Marek Polacek from comment #3)
> Done.

This is very fast. Thanks, Marek.


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

end of thread, other threads:[~2015-09-02 21:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02  7:19 [Bug c/67432] New: Improve error message on empty enum chengniansun at gmail dot com
2015-09-02 14:39 ` [Bug c/67432] " mpolacek at gcc dot gnu.org
2015-09-02 21:01 ` mpolacek at gcc dot gnu.org
2015-09-02 21:01 ` mpolacek at gcc dot gnu.org
2015-09-02 21:25 ` chengniansun at gmail dot com

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