This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Allow embedded timestamps by C/C++ macros to be set externally (3)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: Eduard Sanou <eduardsanou at openmailbox dot org>, Jakub Jelinek <jakub at redhat dot com>, Dhole <dhole at openmailbox dot org>, Matthias Klose <doko at ubuntu dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 May 2016 15:50:53 +0000
- Subject: Re: Allow embedded timestamps by C/C++ macros to be set externally (3)
- Authentication-results: sourceware.org; auth=none
- References: <571FFADB dot 3080209 at redhat dot com> <20160427155633 dot GA21574 at panther> <5721D5DC dot 7060004 at ubuntu dot com> <20160428100815 dot GL26501 at tucnak dot zalov dot cz> <5721E68C dot 20208 at redhat dot com> <20160428103506 dot GM26501 at tucnak dot zalov dot cz> <57220BC2 dot 7080901 at redhat dot com> <20160428131420 dot GO26501 at tucnak dot zalov dot cz> <20160428182956 dot GG21574 at panther> <20160429071744 dot GX26501 at tucnak dot zalov dot cz> <20160505232654 dot GW21574 at panther> <5731C6B3 dot 3070903 at redhat dot com>
On Tue, 10 May 2016, Bernd Schmidt wrote:
> I think Andreas' concern is that this might need to have a "ll" suffix. The
> simplest option might be to use the HOST_WIDE_INT_C macro, and then
> HOST_WIDE_INT_PRINT_DEC for the error message.
HOST_WIDE_INT_PRINT_DEC is a host printf format, not a format for GCC's
diagnostic functions such as error_at. Formats such as %wd must be used
with the latter. (Formats for GCC's diagnostic functions also mustn't
depend on the host, or involve concatenation with macros, so that the
messages can be translated.)
--
Joseph S. Myers
joseph@codesourcery.com