--- a/lib/accessor.h Sun Feb 16 14:29:31 2014 +0000
+++ b/lib/accessor.h Wed Feb 19 22:27:11 2014 +0100
@@ -105,9 +105,9 @@
#define __SET_VAR(prefix, name, new_value, ...)\
if (!(prefix name.flags & __IEC_FORCE_FLAG)) prefix name.value __VA_ARGS__ = new_value
#define __SET_EXTERNAL(prefix, name, new_value, ...)\
- {extern IEC_BYTE __IS_GLOBAL_##name##_FORCED();\
- if (!(prefix name.flags & __IEC_FORCE_FLAG || __IS_GLOBAL_##name##_FORCED()))\
- (*(prefix name.value)) __VA_ARGS__ = new_value;}
+ {extern IEC_BYTE __IS_GLOBAL_##name##_FORCED(void);\
+ if (!(prefix name.flags & __IEC_FORCE_FLAG || __IS_GLOBAL_##name##_FORCED()))\
+ (*(prefix name.value)) __VA_ARGS__ = new_value;}
#define __SET_EXTERNAL_FB(prefix, name, new_value, ...)\
__SET_VAR((*(prefix name)), __VA_ARGS__, new_value)
#define __SET_LOCATED(prefix, name, new_value, ...)\
--- a/stage1_2/Makefile.am Sun Feb 16 14:29:31 2014 +0000
+++ b/stage1_2/Makefile.am Wed Feb 19 22:27:11 2014 +0100
@@ -5,12 +5,12 @@
# Make sure this header file is generated first (by bison), as it is included
# by other C++ code that will also be compiled.
-BUILT_SOURCES = iec_bison.h
+BUILT_SOURCES = iec_bison.hh
CLEANFILES = \
iec_flex.cc \
iec_bison.cc \
- iec_bison.h
+ iec_bison.hh
lib_LIBRARIES = libstage1_2.a
libstage1_2_a_SOURCES = \
@@ -19,5 +19,5 @@
create_enumtype_conversion_functions.cc \
stage1_2.cc
-libstage1_2_a_CPPFLAGS = -DDEFAULT_LIBDIR='"lib"' -I../../absyntax -DYY_BUF_SIZE=65536
+libstage1_2_a_CPPFLAGS = -DDEFAULT_LIBDIR='"lib"' -I../../absyntax -DYY_BUF_SIZE=65536 -fpermissive
--- a/stage1_2/iec_bison.yy Sun Feb 16 14:29:31 2014 +0000
+++ b/stage1_2/iec_bison.yy Wed Feb 19 22:27:11 2014 +0100
@@ -96,7 +96,7 @@
#include "../absyntax/absyntax.hh"
/* file with declaration of token constants. Generated by bison! */
-#include "iec_bison.h"
+#include "iec_bison.hh"
/* The interface through which bison and flex interact. */
#include "stage1_2_priv.hh"
@@ -169,10 +169,10 @@
/* global variables... */
/*************************/
/* NOTE: For some strange reason bison ver 2.3 is including these declarations
- * in the iec_bison.h file, which is in turn included by flex.
+ * in the iec_bison.hh file, which is in turn included by flex.
* We cannot therefore define any variables over here, but merely declare
* their existance (otherwise we get errors when linking the code, since we
- * would get a new variable defined each time iec_bison.h is included!).
+ * would get a new variable defined each time iec_bison.hh is included!).
* Even though the variables are declared 'extern' over here, they will in
* fact be defined towards the end of this same file (i.e. in the prologue)
*/
@@ -250,14 +250,14 @@
/* The following definitions need to be inside a '%code requires'
* so that they are also included in the header files. If this were not the case,
* YYLTYPE would be delcared as something in the iec.cc file, and another thing
- * (actually the default value of YYLTYPE) in the iec_bison.h heder file.
+ * (actually the default value of YYLTYPE) in the iec_bison.hh heder file.
*/
%code requires {
/* define a new data type to store the locations, so we can also store
* the filename in which the token is expressed.
*/
-/* NOTE: since this code will be placed in the iec_bison.h header file,
- * as well as the iec.cc file that also includes the iec_bison.h header file,
+/* NOTE: since this code will be placed in the iec_bison.hh header file,
+ * as well as the iec.cc file that also includes the iec_bison.hh header file,
* declaring the typedef struct yyltype__local here would result in a
* compilation error when compiling iec.cc, as this struct would be
* declared twice.
--- a/stage1_2/iec_flex.ll Sun Feb 16 14:29:31 2014 +0000
+++ b/stage1_2/iec_flex.ll Wed Feb 19 22:27:11 2014 +0100
@@ -124,17 +124,17 @@
/* Required only for the declaration of abstract syntax classes
* (class symbol_c; class token_c; class list_c;)
* These will not be used in flex, but the token type union defined
- * in iec_bison.h contains pointers to these classes, so we must include
+ * in iec_bison.hh contains pointers to these classes, so we must include
* it here.
*/
#include "../absyntax/absyntax.hh"
-/* iec_bison.h is generated by bison.
+/* iec_bison.hh is generated by bison.
* Contains the definition of the token constants, and the
* token value type YYSTYPE (in our case, a 'const char *')
*/
-#include "iec_bison.h"
+#include "iec_bison.hh"
#include "stage1_2_priv.hh"
--- a/stage1_2/stage1_2.cc Sun Feb 16 14:29:31 2014 +0000
+++ b/stage1_2/stage1_2.cc Wed Feb 19 22:27:11 2014 +0100
@@ -44,7 +44,7 @@
#include "stage1_2.hh"
-#include "iec_bison.h"
+#include "iec_bison.hh"
#include "stage1_2_priv.hh"
#include "create_enumtype_conversion_functions.hh"
@@ -128,14 +128,14 @@
/* NOTE: only accessed indirectly by the lexical parser (flex)
* through the function get_identifier_token()
*/
-/* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec_bison.h.
+/* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec_bison.hh.
* We need this constant defined before we can declare the symbol tables.
- * However, we cannot #include "iec_bison.h" in this file (stage1_2_priv.hh) directly
+ * However, we cannot #include "iec_bison.hh" in this file (stage1_2_priv.hh) directly
* because of the way bison ver. 3.2 is copying all declarations in the prologue
- * of iec.y to the iec_bison.h file (including an #include stage1_2_priv.hh).
- * So, if we were to include "iec_bison.h" here, we would get a circular include.
+ * of iec.y to the iec_bison.hh file (including an #include stage1_2_priv.hh).
+ * So, if we were to include "iec_bison.hh" here, we would get a circular include.
* All this means that whoever includes this file (stage1_2_priv.hh) will need
- * to take care to first inlcude iec_bison.h !!
+ * to take care to first inlcude iec_bison.hh !!
*/
/* A symbol table to store all the library elements */
/* e.g.: <function_name , function_decl>
--- a/stage1_2/stage1_2_priv.hh Sun Feb 16 14:29:31 2014 +0000
+++ b/stage1_2/stage1_2_priv.hh Wed Feb 19 22:27:11 2014 +0100
@@ -40,10 +40,10 @@
/* !!! WARNING !!!
*
* Whoever includes this file (stage1_2_priv.hh) will need
- * to first inlcude iec_bison.h !!
+ * to first inlcude iec_bison.hh !!
*
* Read other comments further down to understand why we don't
- * include iec_bison.h in this file.
+ * include iec_bison.hh in this file.
*/
@@ -188,14 +188,14 @@
*
* In essence, they are a data passing mechanism between Bison and Flex.
*/
-/* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec_bison.h.
+/* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec_bison.hh.
* We need this constant defined before we can declare the symbol tables.
- * However, we cannot #include "iec_bison.h" in this file (stage1_2_priv.hh) directly
+ * However, we cannot #include "iec_bison.hh" in this file (stage1_2_priv.hh) directly
* because of the way bison ver. 2.3 is copying all declarations in the prologue
- * of iec.y to the iec_bison.h file (including an #include stage1_2_priv.hh).
- * So, if we were to include "iec_bison.h" here, we would get a circular include.
+ * of iec.y to the iec_bison.hh file (including an #include stage1_2_priv.hh).
+ * So, if we were to include "iec_bison.hh" here, we would get a circular include.
* All this means that whoever includes this file (stage1_2_priv.hh) will need
- * to take care to first inlcude iec_bison.h !!
+ * to take care to first inlcude iec_bison.hh !!
*/
/* A symbol table to store all the library elements */
/* e.g.: <function_name , function_decl>