This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MACROS TOO NESTED

Hi all, I have a code already written on an 8051 based controller, in which I am enabling some features through Preprocessor Directives. In that process, I am struck at the following error.

C51 COMPILER V7.50 - SN: K1DQP-01744E
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2004
C51 FATAL-ERROR - ACTION: PARSING SOURCE-FILE ERROR: PREPROCESSOR: MACROS TOO NESTED
C51 TERMINATED.

Kindly let me know what does this error mean and how to rectify this?
Awaiting your reply.
Regards,
Balaji

Parents
  • NEVER-EVER use macros to do more than a very-very simple thing like:

    abs( x ); -or-
    max( x, y );

    I once saw [a retard's] code in which he used macros everywhere. I then chose to ban all macros in the company (my rule-book).

    The only exception is if the code-monkey obtains a waiver from either the customer, or project manager.

    And yes I know there can be a fine-line between a #define and a macro.

    I don't think you are saving much time when implementing [nested] macros: errors can be hard to track down too.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Reply
  • NEVER-EVER use macros to do more than a very-very simple thing like:

    abs( x ); -or-
    max( x, y );

    I once saw [a retard's] code in which he used macros everywhere. I then chose to ban all macros in the company (my rule-book).

    The only exception is if the code-monkey obtains a waiver from either the customer, or project manager.

    And yes I know there can be a fine-line between a #define and a macro.

    I don't think you are saving much time when implementing [nested] macros: errors can be hard to track down too.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Children