Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-7326

Preprocessing parsing error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 2.6.0-rc
    • C/C++/Obj-C++ Support
    • None
    • Creator HEAD: ae394dfb2094f682962748720f4405ba07403734
      OS: Linux 64-bit

      The following code produces an invalid preprocessing expansion under Creator:

      #if !defined(X) && defined(A)
      foo
      #endif
      
      #if defined(A)
      bar
      #endif
      

      If you paste this in Creator, you'll see that the "bar" line is greyed out because A isn't defined, but the "foo" line has a white background. Somehow, Creator thinks that the condition evaluated to true.

      Placing parentheses around the negative (as "(!defined(X))") does not help.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            hjk hjk
            thiago Thiago Macieira
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes