From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9502 invoked by alias); 18 Jun 2002 16:56:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 9455 invoked by uid 71); 18 Jun 2002 16:56:03 -0000 Resent-Date: 18 Jun 2002 16:56:03 -0000 Resent-Message-ID: <20020618165603.9454.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, ms@siroyan.com Received: (qmail 2887 invoked by uid 61); 18 Jun 2002 16:49:45 -0000 Message-Id: <20020618164945.2886.qmail@sources.redhat.com> Date: Tue, 18 Jun 2002 10:46:00 -0000 From: ms@siroyan.com Reply-To: ms@siroyan.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/7070: internal error with -Wunknown-pragmas && empty #pragma X-SW-Source: 2002-06/txt/msg00424.txt.bz2 List-Id: >Number: 7070 >Category: c >Synopsis: internal error with -Wunknown-pragmas && empty #pragma >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Tue Jun 18 09:56:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Marcus Shawcroft >Release: 3.1 >Organization: >Environment: redhat 7.1 i686 >Description: The -Wunknown-pragmas option doesn;t like empty #pragma's. Try this on the attached file: gcc -Wall x.c Gives: internal error: x.c:1:8: unspellable token CPP_EOF >How-To-Repeat: >Fix: *** /project/vobtags/toolsdev/gcc/gcc/gcc/c-lex.c@@/main/Integration.5410/Integration.6110/ms_toolsdev/0 Tue Jun 18 17:27:17 2002 --- c-lex.c Tue Jun 18 17:27:54 2002 *************** *** 338,348 **** const cpp_token *s; s = cpp_get_token (pfile); - space = cpp_token_as_text (pfile, s); - s = cpp_get_token (pfile); if (s->type == CPP_NAME) ! name = cpp_token_as_text (pfile, s); ! lineno = SOURCE_LINE (map, line); if (name) warning ("ignoring #pragma %s %s", space, name); --- 338,350 ---- const cpp_token *s; s = cpp_get_token (pfile); if (s->type == CPP_NAME) ! { ! space = cpp_token_as_text (pfile, s); ! s = cpp_get_token (pfile); ! if (s->type == CPP_NAME) ! name = cpp_token_as_text (pfile, s); ! } lineno = SOURCE_LINE (map, line); if (name) warning ("ignoring #pragma %s %s", space, name); >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="x.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="x.c" I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQKbWFpbiAoaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkKewog IHByaW50ZiAoIkhlbGxvIFdvcmxkXG4iKTsKfQo=