public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/20078] Gcc doesn't complain about non-benign macro definitions
       [not found] <bug-20078-6@http.gcc.gnu.org/bugzilla/>
@ 2009-04-19 17:11 ` jsm28 at gcc dot gnu dot org
  2009-04-19 17:14 ` jsm28 at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-04-19 17:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jsm28 at gcc dot gnu dot org  2009-04-19 17:11 -------
Subject: Bug 20078

Author: jsm28
Date: Sun Apr 19 17:10:56 2009
New Revision: 146352

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146352
Log:
libcpp:
        PR preprocessor/20078
        * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
        field.
        * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
        (struct cpp_token): Change flags to unsigned short.
        * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
        (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
        (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
        tokens.
        * macro.c (macro_real_token_count): New.
        (enter_macro_context, replace_args): Use macro_real_token_count.
        (create_iso_definition): Record whitespace surrounding and digraph
        spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
        Set extra_tokens and save CPP_PASTE tokens with arg_no set for
        multiple consecutive ## tokens.
        (_cpp_create_definition): Initialize extra_tokens.
        (cpp_macro_definition): Use macro_real_token_count.

gcc/testsuite:
        * gcc.dg/cpp/paste16.c, gcc.dg/cpp/redef4.c: New tests.

Added:
    trunk/gcc/testsuite/gcc.dg/cpp/paste16.c
    trunk/gcc/testsuite/gcc.dg/cpp/redef4.c
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/libcpp/ChangeLog
    trunk/libcpp/include/cpp-id-data.h
    trunk/libcpp/include/cpplib.h
    trunk/libcpp/lex.c
    trunk/libcpp/macro.c


-- 


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


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

* [Bug preprocessor/20078] Gcc doesn't complain about non-benign macro definitions
       [not found] <bug-20078-6@http.gcc.gnu.org/bugzilla/>
  2009-04-19 17:11 ` [Bug preprocessor/20078] Gcc doesn't complain about non-benign macro definitions jsm28 at gcc dot gnu dot org
@ 2009-04-19 17:14 ` jsm28 at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-04-19 17:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jsm28 at gcc dot gnu dot org  2009-04-19 17:14 -------
Fixed for 4.5 along with related issues about whitespace variations around
# and ## operators, and variations in the number of consecutive ##
operators, not always being diagnosed as invalid duplicate macro definitions.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to work|                            |4.5.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.0


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


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

* [Bug preprocessor/20078] Gcc doesn't complain about non-benign macro definitions
  2005-02-19 20:32 [Bug preprocessor/20078] New: " neil at gcc dot gnu dot org
@ 2005-02-19 23:15 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-19 23:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-19 17:05 -------
Confirmed, not a regression.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |accepts-invalid, diagnostic
      Known to fail|                            |2.95.3 3.0.4 3.2.3 3.3.3
                   |                            |3.4.0 4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-19 17:05:00
               date|                            |


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


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

end of thread, other threads:[~2009-04-19 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-20078-6@http.gcc.gnu.org/bugzilla/>
2009-04-19 17:11 ` [Bug preprocessor/20078] Gcc doesn't complain about non-benign macro definitions jsm28 at gcc dot gnu dot org
2009-04-19 17:14 ` jsm28 at gcc dot gnu dot org
2005-02-19 20:32 [Bug preprocessor/20078] New: " neil at gcc dot gnu dot org
2005-02-19 23:15 ` [Bug preprocessor/20078] " pinskia 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).