iverilog/driver
StefanBruens 8e54e31bd8 Fix redefinition of YYLTYPE struct caused by wrong include order
cfparse.h defines the YYLTYPE struct in case it has not been defined, and
also declares an extern YYLTYPE cflloc which is used in cflexor.

As cfparse_misc.h defines an extended YYLTYPE, the cflloc instance in
cfparse.c has this extended type, i.e. there is a type mismatch.

Changing the include order in cflexor causes both cflexor.c and
cfparse.c to use the definition from cfparse_misc.h.

This has been uncovered by GCC when using LTO:
---
gcc -flto=8 main.o substit.o cflexor.o cfparse.o -o iverilog 
cfparse.h:105:16: warning: type of 'cflloc' does not match original declaration [-Wlto-type-mismatch]
  105 | extern YYLTYPE cflloc;
      |                ^
cfparse.c:1162:9: note: type 'struct cfltype' should match type 'struct YYLTYPE'
 1162 | YYLTYPE yylloc
      |         ^
cfparse.c:1162:9: note: 'cflloc' was previously declared here
cfparse.c:1162:9: note: code may be misoptimized unless '-fno-strict-aliasing' is used
---

(cherry picked from commit d58fde6f36)
2019-08-02 10:15:55 +01:00
..
Makefile.in Rearrange compiler warning flags 2014-07-09 09:04:17 -07:00
cflexor.lex Fix redefinition of YYLTYPE struct caused by wrong include order 2019-08-02 10:15:55 +01:00
cfparse.y Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
cfparse_misc.h Update header files to use a more standard name to prevent rereading 2014-07-23 13:42:56 -07:00
globals.h Update header files to use a more standard name to prevent rereading 2014-07-23 13:42:56 -07:00
iverilog.man.in Fix a typo in the man page 2019-03-16 12:42:09 +00:00
main.c Allow library files to be specified on the iverilog command line. 2016-10-02 19:17:24 +01:00
substit.c Easy changes for -Wmissing-prototypes 2014-07-10 14:07:30 -07:00