Fix build of BSD dtc when NDEBUG is defined (MK_ASSERT_DEBUG=no):

* Initialize correct parent in binary_operator's constructor.
* Include <errno.h> explicitly, otherwise errno is undefined (without
  NDEBUG, this is accidentally 'fixed' by including <iostream>).

Reported by:	matteo
MFC after:	3 days
This commit is contained in:
Dimitry Andric 2017-02-13 20:56:53 +00:00
parent c7529864f6
commit 23cba92bd3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313709

View file

@ -32,6 +32,7 @@
#include "input_buffer.hh"
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
@ -544,7 +545,8 @@ struct binary_operator : public binary_operator_base
* Constructor. Takes the name of the operator as an argument, for
* debugging. Only stores it in debug mode.
*/
binary_operator(source_location l, const char *) : expression(l) {}
binary_operator(source_location l, const char *) :
binary_operator_base(l) {}
#else
const char *opName;
binary_operator(source_location l, const char *o) :