Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-187

Precompiled header is broken with anything but C++ (C, Objective-C, Objective-C++)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 1.0.0
    • 0.3
    • None
    • OS X 10.8.2
      Xcode 4.5.2 (4G2008a)
      i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
      qbs 159e5e61dbea6283bfc64d6a28bce2f44a1c2b92
    • cc9fc122fb1766d7f2249c8b78b7fdab00ba08d8

    Description

      Attempting to use a precompiled header with any language but C++ will fail. In one instance this resulted in a massive amount of error messages as if it was trying to send a binary file through the compiler, though in my test case it just fails immediately saying 'invalid pch'.

      "In file included from <command-line>:0:
      /path/to/src/build/500-64-debug/MyProject:1: error: stray ‘\317’ in program"

      I've attached a test case - rename the pchbug.cpp file (it's a polyglot) to pchbug.c, pchbug.m, or pchbug.mm and observe that "warning: /path/to/pchbug.gch: not for GNU <language name>" is output and the project fails to build.

      I understand the property is cpp.precompiledHeader but surely we want it to work with all four C-family languages?

      Attachments

        1. pchbug.cpp
          0.2 kB
        2. pchbug.pch
          0.1 kB
        3. pchbug.qbs
          0.2 kB

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes