Thread: Meaning of Code Lines

  1. #1
    Registered User
    Join Date
    Apr 2008

    Meaning of Code Lines

    Dear All,
    While analysing project code..i am not able to understand following peace of code..code any body help me out this?

    #ifdef QAC
    #pragma PRQA_MESSAGES_OFF 3409, 3410

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    #ifdef XX
    checks if there is a macro defined with the name XX. I would expect that QAC is a "compiler defined macro".
    #pragma YYYY
    is a compiler specific instruction to the compiler. In this case, it looks like it's disabling some warning messages - but that would be something you need to look at the specific compiler to find out.

    #endif is the end of #if or #ifdef.

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Katy, Texas
    Quote Originally Posted by matsp View Post
    #ifdef XX
    checks if there is a macro defined with the name XX. I would expect that QAC is a "compiler defined macro".

    Did you mean constant?
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  4. #4
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    No, macro would be more correct.

    #define FOO
    #ifdef FOO
    /* something */
    You'd get that something.

  5. #5
    Registered User
    Join Date
    Sep 2008
    Toronto, Canada
    The OP may be asking what the general intent of the code is.

    It is designed to suppress the specified warning messages. You'd have to look up what the 3409 and 3410 messages talk about and why it would be OK to suppress such messages.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Your biggest project: how many lines have you written?
    By happyclown in forum A Brief History of
    Replies: 44
    Last Post: 04-29-2009, 07:30 AM
  2. Lines of code per day.
    By abachler in forum A Brief History of
    Replies: 19
    Last Post: 10-26-2007, 09:20 AM
  3. Replies: 7
    Last Post: 07-30-2005, 11:28 PM
  4. count only lines of code...
    By flightsimdude in forum C Programming
    Replies: 13
    Last Post: 09-23-2003, 07:08 PM
  5. What do these tow lines of code mean?
    By Gamma in forum C++ Programming
    Replies: 1
    Last Post: 04-25-2002, 04:30 PM