This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Disable libcpp With GCC 4.8?


On Fri, Oct 25, 2013 at 10:17 AM, Ian Lance Taylor <iant@google.com> wrote:
> On Fri, Oct 25, 2013 at 7:20 AM, Cyd Haselton <chaselton@gmail.com> wrote:
>>
>> If this library is for the C/C++ preprocessor, is it possible that the
>> error could be due to Android's very limited support for C++?
>
> I wouldn't think so.  What we're talking about here is the compiler
> itself, and in any case this bit is just ordinary C.
>

Thanks for the info.  Maybe it's a Bionic issue.

>
>>> In the meantime you can fix the problem by editing the GCC sources to
>>> do something like
>>>     time_t t = (time_t) st->st_mtime;
>>>     tb = localtime (&t);
>>
>> Ergh. Adding just this throws an 'undeclared in scope' error.
>
> That doesn't make much sense.
>
*snip*

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); */

Cyd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]