Menu

#97 build issue: '\0' vs. NULL

None
closed-fixed
None
5
2017-06-22
2017-06-01
No

With newer gcc compilers you are not allowed any more to confuse '\0' and NULL:

[ 207s] fmc_all_cls.cc: In member function 'var_sct vlist_cls::atoi_fnd(bool&, std::vector<antlr::astrefcount\<antlr::ast> >&, fmc_cls&, ncoTree&)':
[ 207s] fmc_all_cls.cc:4174:21: error: invalid conversion from 'char' to 'char</antlr::astrefcount\<antlr::ast>
' [-fpermissive]
[ 207s] char pend='\0';
[ 207s] ^~~~
[ 207s] fmc_all_cls.cc:4193:21: error: invalid conversion from 'char' to 'char
' [-fpermissive]
[ 207s] char *pend='\0';
[ 207s] ^~~~

1 Attachments

Discussion

  • Manfred Schwarb

    Manfred Schwarb - 2017-06-01

    Bah, need to quote this as code, so it does not get mangled (stars get deleted otherwise):

    [  207s] fmc_all_cls.cc: In member function 'var_sct* vlist_cls::atoi_fnd(bool&, std::vector<antlr::ASTRefCount<antlr::AST> >&, fmc_cls&, ncoTree&)':
    [  207s] fmc_all_cls.cc:4174:21: error: invalid conversion from 'char' to 'char*' [-fpermissive]
    [  207s]           char *pend='\0';
    [  207s]                      ^~~~
    [  207s] fmc_all_cls.cc:4193:21: error: invalid conversion from 'char' to 'char*' [-fpermissive]
    [  207s]           char *pend='\0';
    [  207s]                      ^~~~
    
     
    • Charlie Zender

      Charlie Zender - 2017-06-02

      Thank you for the patch. It has been merged. cz

       
  • Charlie Zender

    Charlie Zender - 2017-06-22
    • status: open --> closed-fixed
    • assigned_to: Charlie Zender
    • Group: -->
     
  • Charlie Zender

    Charlie Zender - 2017-06-22

    the provided patch fixed the problem and the fix will be in 4.6.8

     

Log in to post a comment.