[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  SystemPerl
  Voneline
  WFH
General Info
  Papers

Issue #530

Compiler error with GCC 4.7.0

Added by Jeremy Bennett 11 months ago. Updated 10 months ago.

Status:Closed Start date:07/03/2012
Priority:Normal Due date:
Assignee:Jeremy Bennett % Done:

100%

Category:Configure/Make/Compiling
Target version:-

Description

Compiling Verilator with GCC 4.7.0 generates the following error:

../V3Clean.cpp: In member function ‘void CleanVisitor::setCppWidth(AstNode*)’:
../V3Clean.cpp:85:17: error: redeclaration of ‘AstNodeDType* new_dtypep’
../V3Clean.cpp:81:24: error: ‘AstNodeDType* new_dtypep’ previously declared here

I provide a patch which corrects this.

In addition I have taken the opportunity to tidy up the following warnings, all due to using false instead of NULL.

../V3PreProc.cpp: In member function ‘FileLine* V3PreProcImp::defFileline(const string&)’:
../V3PreProc.cpp:323:41: warning: converting ‘false’ to pointer type ‘FileLine*’ [-Wconversion-null]
../V3Cdc.cpp:363:48: warning: converting ‘false’ to pointer type ‘CdcEitherVertex*’ [-Wconversion-null]
../V3Cdc.cpp:386:10: warning: converting ‘false’ to pointer type ‘CdcEitherVertex*’ [-Wconversion-null]
../V3Cdc.cpp:394:10: warning: converting ‘false’ to pointer type ‘CdcEitherVertex*’ [-Wconversion-null]
../V3Tristate.cpp: In member function ‘virtual void TristateVisitor::visit(AstNodeModule*, AstNUser*)’:
../V3Tristate.cpp:1242:13: warning: converting ‘false’ to pointer type ‘AstNode*’ [-Wconversion-null]
../V3Tristate.cpp: In constructor ‘TristateVisitor::TristateVisitor(AstNode*)’:
../V3Tristate.cpp:1294:13: warning: converting ‘false’ to pointer type ‘AstNode*’ [-Wconversion-null]

This should prevent future GCC hassles as it gets ever stricter on the C/C++ standard. Please pull the patch from github:

https://github.com/jeremybennett/verilator/tree/gcc-4.7.0

History

Updated by Wilson Snyder 10 months ago

  • Status changed from New to Resolved

Thanks for the good patch set. Fixed in git towards 3.840+.

Updated by Wilson Snyder 10 months ago

  • Status changed from Resolved to Closed

In 3.840.

Also available in: Atom