problem w/ cpplib.c change

Dave Brolley brolley@cygnus.com
Sun Feb 28 18:15:00 GMT 1999


Looks OK to me....

Dave

Brendan Kehoe wrote:

> Zack, FYI in your recent change to cpplib.c, `ip' doesn't show up as declared
> at this point when STDC_0_IN_SYSTEM_HEADERS is defined:
>
>     case T_STDC:
>       CPP_RESERVE (pfile, 2);
> #ifdef STDC_0_IN_SYSTEM_HEADERS
>       ip = CPP_BUFFER (pfile);
>       while (! ip->nominal_fname && ip != CPP_NULL_BUFFER (pfile))
>         ip = CPP_PREV_BUFFER (ip);
>       if (ip->system_header_p
>           && ! cpp_lookup (pfile, (U_CHAR *) "__STRICT_ANSI__", 15, -1))
>         CPP_PUTC_Q (pfile, '0');
>       else
> #endif
>         CPP_PUTC_Q (pfile, '1');
>       CPP_NUL_TERMINATE_Q (pfile);
>       return;
>
> Found doing a sparc-sun-solaris2.5.1 native build.
>
> This change will move the definition of `ip' to be in scope for the whole
> function, rather than introduce it into particular case stmts.
>
> Ok to go in, Dave?
>
> B
>
> 1999-02-09  Brendan Kehoe  <brendan@cygnus.com>
>
>         * cpplib.c (special_symbol): Move IP to be declared in function
>         scope, rather than individual case statements.
>
> Index: cpplib.c
> ===================================================================
> RCS file: /cvs/egcs/egcs/gcc/cpplib.c,v
> retrieving revision 1.69
> diff -u -p -r1.69 cpplib.c
> --- cpplib.c    1999/02/09 07:31:56     1.69
> +++ cpplib.c    1999/02/09 17:25:25
> @@ -1884,13 +1884,14 @@ special_symbol (hp, pfile)
>  {
>    const char *buf;
>    int len;
> +  cpp_buffer *ip;
>
>    switch (hp->type)
>      {
>      case T_FILE:
>      case T_BASE_FILE:
>        {
> -       cpp_buffer *ip = CPP_BUFFER (pfile);
> +       ip = CPP_BUFFER (pfile);
>         if (hp->type == T_BASE_FILE)
>           {
>             while (CPP_PREV_BUFFER (ip) != CPP_NULL_BUFFER (pfile))
> @@ -1915,7 +1916,7 @@ special_symbol (hp, pfile)
>      case T_INCLUDE_LEVEL:
>        {
>         int true_indepth = 0;
> -       cpp_buffer *ip = CPP_BUFFER (pfile);
> +       ip = CPP_BUFFER (pfile);
>         for (;  ip != CPP_NULL_BUFFER (pfile); ip = CPP_PREV_BUFFER (ip))
>           if (ip->fname != NULL)
>             true_indepth++;
>
> B
>
> --
> Brendan Kehoe                                               brendan@cygnus.com
> Cygnus Solutions, Sunnyvale, CA                                +1 408 542 9600
>
> Web page: http://www.zen.org/~brendan/






More information about the Gcc-patches mailing list