This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [cpplib]: Fix recent lossage
Neil Booth wrote:
> Hmmm, msg is a pointer to const. Could you add casts?
Doh!
How strange, it only elicits a warning.
this one ok? -- or is there a neater way of removing that extra
spacing?
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2000-07-07 Nathan Sidwell <nathan@codesourcery.com>
* cpplib.c (do_pragma_dependency): Tidy warning messages.
Index: cpplib.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpplib.c,v
retrieving revision 1.183
diff -c -3 -p -r1.183 cpplib.c
*** cpplib.c 2000/07/06 09:51:57 1.183
--- cpplib.c 2000/07/07 13:46:26
*************** do_pragma_dependency (pfile)
*** 895,906 ****
{
const cpp_token *msg = cpp_get_token (pfile);
! cpp_warning (pfile, "current file is older than %c%s%c",
! left, name, right);
if (msg->type != CPP_EOF)
{
U_CHAR *text, *limit;
text = pfile->limit;
_cpp_dump_list (pfile, &pfile->token_list, msg, 0);
limit = pfile->limit;
--- 895,908 ----
{
const cpp_token *msg = cpp_get_token (pfile);
! cpp_warning (pfile, "current file is older than %c%.*s%c",
! left, (int)len, name, right);
if (msg->type != CPP_EOF)
{
U_CHAR *text, *limit;
+ ((cpp_token *)msg)->col = 0;
+ ((cpp_token *)msg)->flags = 0;
text = pfile->limit;
_cpp_dump_list (pfile, &pfile->token_list, msg, 0);
limit = pfile->limit;