Hi Alex, http://stackoverflow.com/questions/3025997/defining-static-const-integer-me mbers-in-class-definition
Andreas On 27/06/2015 00:04, "gem5-dev on behalf of Dutu, Alexandru" <[email protected] on behalf of [email protected]> wrote: >Hi Andreas, > >I remember to be valid to define static const class members in header >files, is that not compliant with the C++ standard? If so which one? >Maybe I am not understanding the issue and would appreciate if you could >detail a bit. > >Thanks, >Alex >________________________________________ >From: gem5-dev [[email protected]] on behalf of Andreas Hansson >[[email protected]] >Sent: Friday, June 26, 2015 4:30 PM >To: [email protected] >Subject: [gem5-dev] Solution to sporadic undefined references > >Hi all, > >Occasionally we have an email on the list where someone building the >gem5.debug binary has sporadic linking errors due to undefined >references. I did some additional digging after running in to this, and >it turns out we have tons of places in the code base that are actually >not compliant with the C++ standard, where we have a static const class >member with a declaration in a header, but no definition in the >implementation. I fixed it for the Request class >(http://reviews.gem5.org/r/2925/) by turning the constants into a C++11 >typed enum, but there are lots of other instances that should eventually >be addresses. I suggest we solve this organically, when ever someone has >issues, submit a fix for that class. Just be aware… > >Andreas > >-- IMPORTANT NOTICE: The contents of this email and any attachments are >confidential and may also be privileged. If you are not the intended >recipient, please notify the sender immediately and do not disclose the >contents to any other person, use it for any purpose, or store or copy >the information in any medium. Thank you. > >ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, >Registered in England & Wales, Company No: 2557590 >ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, >Registered in England & Wales, Company No: 2548782 >_______________________________________________ >gem5-dev mailing list >[email protected] >http://m5sim.org/mailman/listinfo/gem5-dev >_______________________________________________ >gem5-dev mailing list >[email protected] >http://m5sim.org/mailman/listinfo/gem5-dev -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782 _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
