Subject: | Bug: autogenerated code produces incorrect C/C++ syntax - SystemC::Vregs V1.461 |
Date: | Wed, 25 Feb 2009 13:49:56 -0500 |
To: | "'bug-SystemC-Vregs [...] rt.cpan.org'" <bug-SystemC-Vregs [...] rt.cpan.org> |
From: | "Pettigrew, Mark" <Mark.Pettigrew [...] itt.com> |
Show quoted text
----------------------System Details-----------------------------
SystemC-Vregs: Distribution 1.461
Perl version:
perl -v
This is perl, v5.10.0 built for cygwin-thread-multi-64int
(with 6 registered patches, see perl -V for more detail)
Operating System:
uname -a
CYGWIN_NT-5.1 IIWIST-WS197 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
--------------------------------------------------------------------
It is syntactically incorrect to append semicolons to the function declaration and may confuse some compilers. This includes constructors and destructors. This affects the following files:
* Class.pm
* vderegs.cpp
* VregsRegInfo.h
* VregsClass.h
Class.pm
------------
* sub _class_h_write
1. change L328
,"{ ${wset}b,(val&BITMASK_WRITABLE)|(${wget}b)&~BITMASK_WRITABLE)); };\n");
To ,"{ ${wset}b,(val&BITMASK_WRITABLE)|(${wget}b)&~BITMASK_WRITABLE)); }\n");
2. Change L340
,"{ ${wset}b,(val&${fwritable})|(${wget}b)&~${fwritable})); };\n");
To ,"{ ${wset}b,(val&${fwritable})|(${wget}b)&~${fwritable})); }\n");
3 Change L475
$fl->print(" };\n");
to $fl->print(" }\n");
4. Change L481
," };\n");
To ," }\n");
5. Change L488
," };\n");
To ," }\n");
vderegs.cpp
---------------
1. change L114
};
To }
VregsRegInfo.h
--------
1. Change L72
, m_rstVal(rstVal), m_rstMask(rstMask), m_flags(flags) {};
To , m_rstVal(rstVal), m_rstMask(rstMask), m_flags(flags) {}
2. Change L142
VregsRegInfo() {};
To VregsRegInfo() {}
3. Change L143
~VregsRegInfo() {};
To ~VregsRegInfo() {}
4. Change L184
iterator(ByAddrMap::iterator addrIt) : m_addrIt(addrIt) {};
to iterator(ByAddrMap::iterator addrIt) : m_addrIt(addrIt) {}
5. Change L185
inline iterator operator++() {++m_addrIt; return *this;}; ///< prefix
to inline iterator operator++() {++m_addrIt; return *this;} ///< prefix
6. Change L186
inline operator VregsRegEntry* () const { return (m_addrIt->second); };
to inline operator VregsRegEntry* () const { return (m_addrIt->second); }
7. Change L232
};
To }
8. Change L245
iterator(ByNameMap::iterator nameIt) : s_nameIt(nameIt) {};
To iterator(ByNameMap::iterator nameIt) : s_nameIt(nameIt) {}
9. Change L246
inline iterator operator++() {++s_nameIt; return *this;}; ///< prefix
to
inline iterator operator++() {++s_nameIt; return *this;} ///< prefix
10. Change L247
inline operator VregsSpecInfo* () const { return (s_nameIt->second); };
To
inline operator VregsSpecInfo* () const { return (s_nameIt->second); }
VregsClass.h
--------
1. Change L111
: m_obj(obj), m_prefix(prefix) {};
To
: m_obj(obj), m_prefix(prefix) {}
--
Mark Pettigrew - Principal FPGA Engineer
Impact Science and Technology, Inc. - http://www.impactsci.com<http://www.impactsci.com/>
Address: 85 Northwest Boulevard, Nashua, NH 03063-4068
Phone: 603.459.2286 Fax: 603.459.2399
Email: mark.pettigrew@itt.com<mailto:mark.pettigrew@edocorp.com>
________________________________
This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender.
Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of ITT Corporation. The recipient should check this e-mail and any attachments for the presence of viruses. ITT accepts no liability for any damage caused by any virus transmitted by this e-mail.