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: IPA ICF fallout: i586 bootstrap failure fix


> Hello.
> 
> Following patch fixes i586 bootstrap failure: https://gcc.gnu.org/ml/gcc-testresults/2014-10/msg01713.html
> 
> ../../src-trunk/gcc/ipa-icf.c:2096:23: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 3 has type âstd::list<ipa_icf::congruence_class*>::size_type {aka unsigned int}â [-Werror=format=]
>        worklist.size ());
>                        ^
> ../../src-trunk/gcc/ipa-icf.c: In member function âvoid ipa_icf::sem_item_optimizer::dump_cong_classes()â:
> ../../src-trunk/gcc/ipa-icf.c:2116:61: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type âsize_t {aka unsigned int}â [-Werror=format=]
>      m_classes_count, m_classes.elements(), m_items.length ());
> 
> Ready for thunk?
> 
OK, (I would consider this obvious)
Honza

> Thank you,
> Martin

> gcc/ChangeLog:
> 
> 2014-10-16  Martin Liska  <mliska@suse.cz>
> 
> 	* ipa-icf.c (sem_item_optimizer::process_cong_reduction): size_t cast added.
> 	(sem_item_optimizer::dump_cong_classes): Likewise.

> diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
> index 4e73849..f7510b3 100644
> --- a/gcc/ipa-icf.c
> +++ b/gcc/ipa-icf.c
> @@ -2093,7 +2093,7 @@ sem_item_optimizer::process_cong_reduction (void)
>  
>    if (dump_file)
>      fprintf (dump_file, "Worklist has been filled with: %lu\n",
> -	     worklist.size ());
> +	     (unsigned long) worklist.size ());
>  
>    if (dump_file && (dump_flags & TDF_DETAILS))
>      fprintf (dump_file, "Congruence class reduction\n");
> @@ -2113,7 +2113,7 @@ sem_item_optimizer::dump_cong_classes (void)
>  
>    fprintf (dump_file,
>  	   "Congruence classes: %u (unique hash values: %lu), with total: %u items\n",
> -	   m_classes_count, m_classes.elements(), m_items.length ());
> +	   m_classes_count, (unsigned long) m_classes.elements(), m_items.length ());
>  
>    /* Histogram calculation.  */
>    unsigned int max_index = 0;


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