Re: Disable libcpp With GCC 4.8?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 25, 2013 at 8:59 AM, Cyd Haselton <chaselton@xxxxxxxxx> wrote:
>
> Just to clarify...adding the snippet you provided (thank you very
> much...by the way) to the code as follows should **not** throw an 'not
> declared in scope' error?
>
>      *snip*
>      struct tm *tb = NULL;
>      struct stat *st = _cpp_get_file_stat (file);
>      if(st)
>           time_t t = (time_t) st->st_mtime;
>           tb = localtime (&t);
>      /* tb= localtime (&st->st_mtime); */

I'm guessing that you are used to Python?  In C you need braces:

     if(st)
       {
          time_t t = (time_t) st->st_mtime;
          tb = localtime (&t);
     /* tb= localtime (&st->st_mtime); */
        }

Ian




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux