tudor.timi 53 Posted April 25, 2014 Report Share Posted April 25, 2014 Hi, I've tried compiling UVM with QuestaSim and the switch "-pedanticerrors" but it complains in the file uvm_component.svh that virtual method calls are not allowed in the constructor because it can lead to unpredictable results. I know that in C++ the behavior of this scenario is clearly defined (it calls the method of the base class while inside the base class construct and the method of the derived class while in the derived class constructor), but is the same also clearly described in the SV LRM? Thanks, Tudor Quote Link to post Share on other sites
dave_59 34 Posted April 25, 2014 Report Share Posted April 25, 2014 This is not defined in the current LRM. See http://www.eda.org/svdb/view.php?id=2488 The reason Questa produces the warning is because other simulators have chosen to implement it differently than C++ and call the derived method in the base constructor. (at least this was the case when the message was implemented) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.