public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* C++ PATCH [mainline] Use loccation_t in cp/cp-tree.h
@ 2002-12-18  5:10 Gabriel Dos Reis
  0 siblings, 0 replies; only message in thread
From: Gabriel Dos Reis @ 2002-12-18  5:10 UTC (permalink / raw)
  To: gcc-patches


This patchlet makes tree_srcloc use location_t.  No regression.

-- Gaby

2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cp-tree.h (struct tree_srcloc): Use location_t.
	(SOURCE_LOCUS): New macro.
	(SRCLOC_FILE, SRCLOC_LINE): Adjust.

Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.777
diff -p -r1.777 cp-tree.h
*** cp-tree.h	16 Dec 2002 18:22:10 -0000	1.777
--- cp-tree.h	18 Dec 2002 13:03:32 -0000
*************** struct tree_wrapper GTY(())
*** 399,411 ****
    struct z_candidate *z_c;
  };
  
! #define SRCLOC_FILE(NODE) (((struct tree_srcloc*)SRCLOC_CHECK (NODE))->filename)
! #define SRCLOC_LINE(NODE) (((struct tree_srcloc*)SRCLOC_CHECK (NODE))->linenum)
  struct tree_srcloc GTY(())
  {
    struct tree_common common;
!   const char *filename;
!   int linenum;
  };
  
  /* Macros for access to language-specific slots in an identifier.  */
--- 399,413 ----
    struct z_candidate *z_c;
  };
  
! #define SOURCE_LOCUS(NODE) \
!    (((struct tree_srcloc*)SRCLOC_CHECK (NODE))->locus)
! #define SRCLOC_FILE(NODE) SOURCE_LOCUS (NODE).file
! #define SRCLOC_LINE(NODE) SOURCE_LOCUS (NODE).line
! 
  struct tree_srcloc GTY(())
  {
    struct tree_common common;
!   location_t locus;
  };
  
  /* Macros for access to language-specific slots in an identifier.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-18 13:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-18  5:10 C++ PATCH [mainline] Use loccation_t in cp/cp-tree.h Gabriel Dos Reis

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).