Improve name: "count-one-bits" is better than "popcount".
[gnulib.git] / lib / getdate.y
index 1507310..e34f4a9 100644 (file)
@@ -1,7 +1,7 @@
 %{
 /* Parse a string into an internal time stamp.
 
-   Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software
+   Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
 
 #include "getdate.h"
 
+#include "intprops.h"
+#include "timespec.h"
+#include "verify.h"
+
 /* There's no need to extend the stack, so there's no need to involve
    alloca.  */
 #define YYSTACK_USE_ALLOCA 0
 
 #define HOUR(x) ((x) * 60)
 
+/* Lots of this code assumes time_t and time_t-like values fit into
+   long int.  It also assumes that signed integer overflow silently
+   wraps around, but there's no portable way to check for that at
+   compile-time.  */
+verify (TYPE_IS_INTEGER (time_t));
+verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
+
 /* An integer value, and the number of digits in its textual
    representation.  */
 typedef struct