Menu

#32 Warning about BOOL in generated code

open
Generator (31)
1
2006-09-14
2005-11-07
No

When using bool attributes, the generated code
compiles with warnigs about the usage of BOOL.

Why the "bool" C++ built-in type is not used?

Discussion

  • Simone Masoni

    Simone Masoni - 2005-11-07

    Logged In: YES
    user_id=1263211

    The default marshalling for bool in C# is the BOOL type in
    C. BOOL is just a typedef for a int. The code generated
    contains an array of bool and the assignment of a new BOOL
    value to a bool position in the array produces a warning.
    This problem must be discussed.

     
  • G.A. Cignoni

    G.A. Cignoni - 2005-11-08
    • priority: 5 --> 4
     
  • G.A. Cignoni

    G.A. Cignoni - 2005-11-08

    Logged In: YES
    user_id=1311864

    Add a cast to avoid the warning.
    Wait to get rid of C# to definitively use bool.

     
  • G.A. Cignoni

    G.A. Cignoni - 2006-09-14

    Logged In: YES
    user_id=1311864

    Warning is only when compiling with MSVC.
    Use codeblocks and GNU compiler :)

     
  • G.A. Cignoni

    G.A. Cignoni - 2006-09-14
    • priority: 4 --> 1
     
  • G.A. Cignoni

    G.A. Cignoni - 2006-09-14
    • assigned_to: masonisimone --> gcignoni
     

Log in to post a comment.

MongoDB Logo MongoDB