This is the mail archive of the gcc-patches@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: Fwd: A little patch submission


On Thu, Sep 14, 2006 at 12:38:14PM +0300, lkeren@cs.technion.ac.il wrote:
> --- libcpp/macro.c      (revision 114680)
> +++ libcpp/macro.c      (working copy)
> @@ -118,6 +118,8 @@
>    const uchar *result = NULL;
>    unsigned int number = 1;
> 
> +  static unsigned int static_counter = 0;
> +

Are you sure you don't want to reinitialize the counter at the beginning
of each translation unit?  If e.g. more than one source file is
preprocessed in one run (e.g. with gcc --combine), the behavior would
be different from preprocessing them separately.

	Jakub


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