Menu

#49 improve non-fatal pp_cleanup() errors

open
nobody
1
2014-08-08
2003-09-23
No

Currently pp_cleanup() generates a non-fatal
error if "defining" is not NULL.

This should be refined. In particular, the
error should hint at an unfinished %(I)MACRO
if "defining->name" is not NULL, but at an
unfinished %REP if it is NULL.

Furthermore there should be a check to see
if "ctsk" is NULL (before it's being cleaned
out). If it is not, then there should be a
nonfatal error about context "cstk->name"
still being defined, i.e. a missing %POP.

Discussion

  • nasm64developer

    nasm64developer - 2003-09-23
    • priority: 5 --> 1
     
  • Nickolay Yurchenko

    • labels: --> Preprocessor Issues
     
  • Nickolay Yurchenko

    Logged In: YES
    user_id=806493

    Agreed.
    What about non-empty context stack notification, it should be
    a warning because a lot of programs may be written without
    cleaning contexts.

    Also, if we do so, I think, there should be a way to recognize
    whether there is a context on the stack top or not. %(el)if(n)
    ctx do not provide such functionality now - they only perform
    a test of context name.

    I want to propose such syntax:
    %ifctx *

     
  • nasm64developer

    nasm64developer - 2003-09-27

    Logged In: YES
    user_id=804543

    > [non-empty context stack at the end]

    I don't really care whether it's a warning or
    an error, as long as it does complain.

    > [%(el)if(n)ctx should accept *]

    I concur. I've just added that in my version.

     

Log in to post a comment.