Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-131417

qtprotobufgen: header guards with invalid C-identifier

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.2, 6.9.0 FF
    • 6.9
    • Protocol Buffers
    • None
    • 3
    • 4a3fc66b8 (dev), ae39ec18b (6.8)
    • Foundation Sprint 121, Foundation Sprint 122

    Description

      We generate two ways for the include guards: pragma and header guards. The latter approach has some problems though as it struggles with dashes "-" in the filename, e.g. "my-proto.proto". We could transform this into a valid C-identifier, e.g. "MY_PROTO..." but how would we handle the case where we have "my-proto.proto" and "my_proto.proto" in the same project?

       

      We should either fix the header guards approach for this edge case or switch to "#pragma once" as the default and deprecate header guards in the upcoming releases. Current state with a partly broken default is not nice.

       

       

      Attachments

        Issue Links

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

          Activity

            People

              dennisoberst Dennis Oberst
              dennisoberst Dennis Oberst
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes