Looks like bitwise operators inside #define's don't seem to work as I
would expect, DEF_A <C: #define DEF_A 0x0001> DEF_B <C: #define DEF_B 512> DEF_C <C: #define DEF_C DEF_A | DEF_B> Interface new DEF_A -> 1 Interface new DEF_B -> 512 Interface new DEF_C -> 1 whereas it should really be, 1 bitOr: 512 -> 513 Is this a known limitation or a bug? Thanks, -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. |
Boris,
There is a matter of sequence in DLLCC. I just tried your example manually in a browser and - believe it of not - I got Interface new DEF_C -> 513. If by chance the sequence is different (i.e. that DEF_C is compiled before DEF_B, you get 1. With other sequences you might also see 0 and 512 as results. If you ask me whether this is a feature or a bug, my answer is: DLLCC is currently implemented like a steam engine of the 1800s. You must exactly smell what you are doing. You might have heard that there is a plan to redo DLLCC. I have a lot of hope in this new development. For the time being, you are on the safe side if you write: DEF_C <C: #define DEF_C 513> Georg Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812 Tel. +49-3496-214328, Fax +49-3496-214712 > -----Ursprüngliche Nachricht----- > Von: Boris Popov [mailto:[hidden email]] > Gesendet: Dienstag, 7. August 2007 23:01 > An: vwnc >> "VWNC, " > Betreff: [7.5][DLLCC] #define c a | b > > Looks like bitwise operators inside #define's don't seem to work as I > would expect, > > DEF_A > <C: #define DEF_A 0x0001> > DEF_B > <C: #define DEF_B 512> > DEF_C > <C: #define DEF_C DEF_A | DEF_B> > > Interface new DEF_A -> 1 > Interface new DEF_B -> 512 > Interface new DEF_C -> 1 > > whereas it should really be, > > 1 bitOr: 512 -> 513 > > Is this a known limitation or a bug? > > Thanks, > > -Boris > > -- > +1.604.689.0322 > DeepCove Labs Ltd. > 4th floor 595 Howe Street > Vancouver, Canada V6C 2T5 > http://tinyurl.com/r7uw4 > > [hidden email] > > CONFIDENTIALITY NOTICE > > This email is intended only for the persons named in the message > header. Unless otherwise indicated, it contains information that is > private and confidential. If you have received it in error, please > notify the sender and delete the entire message including any > attachments. > > Thank you. |
Thanks, Georg. I knew the compile sequence is important, which is why for some interfaces I define an extra ordering layer that recompiles defines to get proper values everywhere, but in this case I couldn't get 513 of it no matter which order I compiled these in. Big sigh ;) Thanks though, certainly I'll go through all bitwise defines in this interface now, and we'll hope that this gets addressed as part of the larger DLLCC up-to-date'ing task.
Cheers, -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. > -----Original Message----- > From: Georg Heeg [mailto:[hidden email]] > Sent: Tuesday, August 07, 2007 2:22 PM > To: Boris Popov; 'vwnc >> "VWNC, "' > Subject: AW: [7.5][DLLCC] #define c a | b > > Boris, > > There is a matter of sequence in DLLCC. I just tried your example manually > in a browser and - believe it of not - I got Interface new DEF_C -> 513. > > If by chance the sequence is different (i.e. that DEF_C is compiled before > DEF_B, you get 1. With other sequences you might also see 0 and 512 as > results. > > If you ask me whether this is a feature or a bug, my answer is: DLLCC is > currently implemented like a steam engine of the 1800s. You must exactly > smell what you are doing. You might have heard that there is a plan to > redo > DLLCC. I have a lot of hope in this new development. > > For the time being, you are on the safe side if you write: > > DEF_C > <C: #define DEF_C 513> > > Georg > > Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812 > Tel. +49-3496-214328, Fax +49-3496-214712 > > > -----Ursprüngliche Nachricht----- > > Von: Boris Popov [mailto:[hidden email]] > > Gesendet: Dienstag, 7. August 2007 23:01 > > An: vwnc >> "VWNC, " > > Betreff: [7.5][DLLCC] #define c a | b > > > > Looks like bitwise operators inside #define's don't seem to work as I > > would expect, > > > > DEF_A > > <C: #define DEF_A 0x0001> > > DEF_B > > <C: #define DEF_B 512> > > DEF_C > > <C: #define DEF_C DEF_A | DEF_B> > > > > Interface new DEF_A -> 1 > > Interface new DEF_B -> 512 > > Interface new DEF_C -> 1 > > > > whereas it should really be, > > > > 1 bitOr: 512 -> 513 > > > > Is this a known limitation or a bug? > > > > Thanks, > > > > -Boris > > > > -- > > +1.604.689.0322 > > DeepCove Labs Ltd. > > 4th floor 595 Howe Street > > Vancouver, Canada V6C 2T5 > > http://tinyurl.com/r7uw4 > > > > [hidden email] > > > > CONFIDENTIALITY NOTICE > > > > This email is intended only for the persons named in the message > > header. Unless otherwise indicated, it contains information that is > > private and confidential. If you have received it in error, please > > notify the sender and delete the entire message including any > > attachments. > > > > Thank you. > |
Free forum by Nabble | Edit this page |