On Tue, Jan 29, 2013 at 9:56 AM, Peter Maydell wrote:
> On 29 January 2013 08:42, Andreas Färber wrote:
>> Am 28.01.2013 22:10, schrieb Peter Maydell:
>> Where we disagree is that you suggest that do { ... while (0) is any
>> better than G_STMT_START ... G_STMT_END. I disagree and find *both*
>>
Andreas Färber writes:
> Am 29.01.2013 11:03, schrieb Markus Armbruster:
>> Andreas Färber writes:
>>
>>> b) Working around an issue resulting from hiding C statements inside a
>>> preprocessor macro is totally backwards compared to properly using the C
>>> language in the first place. Its mech
Am 29.01.2013 10:56, schrieb Peter Maydell:
> On 29 January 2013 08:42, Andreas Färber wrote:
>> Analysing the reasons for the obscured suggestion:
>>
>> a) "if (foo) MACRO1(); else MACRO2();" is forbidden by Coding Style.
>> Thus, if careful review indicates there are no such Coding Style
>> viol
Am 29.01.2013 11:03, schrieb Markus Armbruster:
> Andreas Färber writes:
>
>> b) Working around an issue resulting from hiding C statements inside a
>> preprocessor macro is totally backwards compared to properly using the C
>> language in the first place. Its mechanism for reuse are functions, a
Andreas Färber writes:
> Am 28.01.2013 22:10, schrieb Peter Maydell:
> [lengthy discussion of what may go wrong without do { ... } while (0)]
>
> We seem to to agree to disagree here.
>
> The use of an if (foo) { ... } inside Fred's macro (or my pseudocode?)
> was what prompted this whole mess, s
On 29 January 2013 08:42, Andreas Färber wrote:
> Am 28.01.2013 22:10, schrieb Peter Maydell:
> Where we disagree is that you suggest that do { ... while (0) is any
> better than G_STMT_START ... G_STMT_END. I disagree and find *both*
> obscuring the code. I clearly stated why.P
>
> Therefore I am
Am 28.01.2013 22:10, schrieb Peter Maydell:
[lengthy discussion of what may go wrong without do { ... } while (0)]
We seem to to agree to disagree here.
The use of an if (foo) { ... } inside Fred's macro (or my pseudocode?)
was what prompted this whole mess, so there is no need to explain that
to
Peter Maydell writes:
> On 28 January 2013 19:14, Andreas Färber wrote:
>> Am 28.01.2013 19:59, schrieb Peter Maydell:
>>> Er, what? "do ... while (0)" is completely standard practice
>>> for writing robust macros in C. Patches which don't do that
>>> should fail code review.
>>
>> Oh really? No
On 28 January 2013 19:14, Andreas Färber wrote:
> Am 28.01.2013 19:59, schrieb Peter Maydell:
>> Er, what? "do ... while (0)" is completely standard practice
>> for writing robust macros in C. Patches which don't do that
>> should fail code review.
>
> Oh really? None of our QOM cast macros use it
Am 28.01.2013 19:22, schrieb Richard Henderson:
> On 01/27/2013 05:32 AM, Andreas Färber wrote:
>> Make LOG_DISAS() arguments compile-testable even if disabled.
>>
>> Signed-off-by: Andreas Färber
>> ---
>> target-alpha/translate.c | 12 ++--
>> 1 Datei geändert, 6 Zeilen hinzugefügt(
Am 28.01.2013 19:59, schrieb Peter Maydell:
> On 28 January 2013 18:54, Andreas Färber wrote:
>> Am 28.01.2013 19:22, schrieb Richard Henderson:
>>> On 01/27/2013 05:32 AM, Andreas Färber wrote:
+#define LOG_DISAS(...) G_STMT_START \
+if (ALPHA_DEBUG_DISAS) { \
+qemu_log
Am 28.01.2013 19:29, schrieb Peter Maydell:
> On 28 January 2013 18:22, Richard Henderson wrote:
>> On 01/27/2013 05:32 AM, Andreas Färber wrote:
>>> +#define LOG_DISAS(...) G_STMT_START \
>>> +if (ALPHA_DEBUG_DISAS) { \
>>> +qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__); \
>>> +
On 28 January 2013 18:54, Andreas Färber wrote:
> Am 28.01.2013 19:22, schrieb Richard Henderson:
>> On 01/27/2013 05:32 AM, Andreas Färber wrote:
>>> +#define LOG_DISAS(...) G_STMT_START \
>>> +if (ALPHA_DEBUG_DISAS) { \
>>> +qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__); \
>>> +
On 28 January 2013 18:22, Richard Henderson wrote:
> On 01/27/2013 05:32 AM, Andreas Färber wrote:
>> +#define LOG_DISAS(...) G_STMT_START \
>> +if (ALPHA_DEBUG_DISAS) { \
>> +qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__); \
>> +} \
>> +G_STMT_END
>
>
> I see zero advantage
On 01/27/2013 05:32 AM, Andreas Färber wrote:
Make LOG_DISAS() arguments compile-testable even if disabled.
Signed-off-by: Andreas Färber
---
target-alpha/translate.c | 12 ++--
1 Datei geändert, 6 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-)
Acked-by: Richard Henderson
+#defin
Make LOG_DISAS() arguments compile-testable even if disabled.
Signed-off-by: Andreas Färber
---
target-alpha/translate.c | 12 ++--
1 Datei geändert, 6 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-)
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index f687b95..c1da5bf 1
16 matches
Mail list logo