public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/34692] [4.2/4.3 regression] Internal error with pragma in macro Date: Fri, 25 Jan 2008 09:44:00 -0000 [thread overview] Message-ID: <20080125090214.27651.qmail@sourceware.org> (raw) In-Reply-To: <bug-34692-1771@http.gcc.gnu.org/bugzilla/> ------- Comment #5 from jakub at gcc dot gnu dot org 2008-01-25 09:02 ------- Subject: Bug 34692 Author: jakub Date: Fri Jan 25 09:01:27 2008 New Revision: 131819 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131819 Log: PR preprocessor/34692 * macro.c (collect_args): Add pragma_buff argument. Push CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather than into arguments. Reset prevent_expansion and parsing_args state at CPP_PRAGMA_EOL/CPP_EOF. (funlike_invocation_p): Add pragma_buff argument, pass it through to collect_args. (enter_macro_context): Add result argument. Adjust funlike_invocation_p caller. Emit all deferred pragma tokens gathered during collect_args before the expansion, add a padding token. Return 2 instead of 1 if any pragma tokens were prepended. (cpp_get_token): If enter_macro_context returns 2, don't return a padding token, instead cycle to grab CPP_PRAGMA token. * directives.c (_cpp_handle_directive): If was_parsing_args in deferred pragma, leave parsing_args and prevent_expansion as is. * gcc.dg/cpp/pr34692.c: New test. * gcc.dg/gomp/pr34692.c: New test. Added: trunk/gcc/testsuite/gcc.dg/cpp/pr34692.c trunk/gcc/testsuite/gcc.dg/gomp/pr34692.c Modified: trunk/gcc/testsuite/ChangeLog trunk/libcpp/ChangeLog trunk/libcpp/directives.c trunk/libcpp/macro.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34692
next prev parent reply other threads:[~2008-01-25 9:03 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-01-06 21:47 [Bug preprocessor/34692] New: [4.2/4.3 regression] reichelt at gcc dot gnu dot org 2008-01-06 21:48 ` [Bug preprocessor/34692] [4.2/4.3 regression] Internal error with prgama in macro reichelt at gcc dot gnu dot org 2008-01-06 22:31 ` [Bug preprocessor/34692] [4.2/4.3 regression] Internal error with pragma " pinskia at gcc dot gnu dot org 2008-01-07 21:19 ` tromey at gcc dot gnu dot org 2008-01-09 21:23 ` jakub at gcc dot gnu dot org 2008-01-11 8:52 ` jakub at gcc dot gnu dot org 2008-01-23 16:36 ` jakub at gcc dot gnu dot org 2008-01-25 9:44 ` jakub at gcc dot gnu dot org [this message] 2008-01-25 9:47 ` [Bug preprocessor/34692] [4.2 " jakub at gcc dot gnu dot org 2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org 2008-05-19 20:32 ` jsm28 at gcc dot gnu dot org 2009-03-31 14:58 ` jsm28 at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080125090214.27651.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).