Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error with GCC 4.7.0 #530

Closed
veripoolbot opened this issue Jul 3, 2012 · 2 comments
Closed

Compiler error with GCC 4.7.0 #530

veripoolbot opened this issue Jul 3, 2012 · 2 comments
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 530 from https://www.veripool.org
Original Date: 2012-07-03
Original Assignee: Jeremy Bennett (@jeremybennett)


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

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-07-15T16:27:42Z


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

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-07-31T22:56:09Z


In 3.840.

@veripoolbot veripoolbot added area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

1 participant