This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warning about __DATE__ and __TIME__
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Gerald Pfeifer <gerald at pfeifer dot com>, gcc at gcc dot gnu dot org
- Date: Sun, 27 Oct 2013 22:35:24 +0100
- Subject: Re: Warning about __DATE__ and __TIME__
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LNX dot 2 dot 00 dot 1310271959580 dot 1528 at trevally dot site> <526D8110 dot 9040502 at net-b dot de>
Tobias Burnus <burnus@net-b.de> writes:
> diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
> index 22f8939..f765018 100644
> --- a/gcc/c-family/c.opt
> +++ b/gcc/c-family/c.opt
> @@ -640,6 +640,10 @@ Wpragmas
> C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
> Warn about misuses of pragmas
>
> +Wdate-time
> +Common Var(cpp_warn_date_time) Warning
> +Warn about __TIME__, __DATE__ and __TIMESTAMP__ pragmas
s/pragmas/usage/
> @@ -359,6 +361,9 @@ gfc_cpp_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED
> gfc_cpp_option.verbose = value;
> break;
>
> + case OPT_Wdate_time:
> + gfc_cpp_option.warn_date_time = value;
+ break;
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."