Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Should I report a bug ?

Should I report a bug ?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
8 Posts 3 Posters 766 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    I have this odd behavior of text enclosed in

    #ifdef BYPASS
    ....
    While I've been programming
    ....
    #endif

    compiler complains about "missing terminating character " in highlighted / bold snippet. It does NOT ignore " ' " . Why?

    raven-worxR 1 Reply Last reply
    0
    • A Anonymous_Banned275

      I have this odd behavior of text enclosed in

      #ifdef BYPASS
      ....
      While I've been programming
      ....
      #endif

      compiler complains about "missing terminating character " in highlighted / bold snippet. It does NOT ignore " ' " . Why?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @AnneRanch
      sure, this isnt C++

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      A 1 Reply Last reply
      0
      • raven-worxR raven-worx

        @AnneRanch
        sure, this isnt C++

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @raven-worx said in Should I report a bug ?:

        @AnneRanch
        sure, this isnt C++

        To whom ( the bell tools ) ?
        preprocessor r forum ?

        raven-worxR 1 Reply Last reply
        0
        • A Anonymous_Banned275

          @raven-worx said in Should I report a bug ?:

          @AnneRanch
          sure, this isnt C++

          To whom ( the bell tools ) ?
          preprocessor r forum ?

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @AnneRanch
          but the line containing the error is not C++, thus an error is expected.

          It does NOT ignore " ' " . Why?

          why do you expect it to be ignored?
          show the whole snippet of code please.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          A 1 Reply Last reply
          0
          • raven-worxR raven-worx

            @AnneRanch
            but the line containing the error is not C++, thus an error is expected.

            It does NOT ignore " ' " . Why?

            why do you expect it to be ignored?
            show the whole snippet of code please.

            A Offline
            A Offline
            Anonymous_Banned275
            wrote on last edited by
            #5

            @raven-worx said in Should I report a bug ?:

            @AnneRanch
            but the line containing the error is not C++, thus an error is expected.

            It does NOT ignore " ' " . Why?

            why do you expect it to be ignored?
            show the whole snippet of code please.

            Are you familiar with preprocessor directives?
            They have been integral part of C since its conception.
            If you are not (familiar with preprocessor ) , how posting the entire several hundreds lines of text will help (you) to understand the issue ?

            #ifdef BYPASS

            do not process what is inside here
            unless BYPASS is define(d)
            that should include " ' "

            #endif

            JonBJ raven-worxR 3 Replies Last reply
            0
            • A Anonymous_Banned275

              @raven-worx said in Should I report a bug ?:

              @AnneRanch
              but the line containing the error is not C++, thus an error is expected.

              It does NOT ignore " ' " . Why?

              why do you expect it to be ignored?
              show the whole snippet of code please.

              Are you familiar with preprocessor directives?
              They have been integral part of C since its conception.
              If you are not (familiar with preprocessor ) , how posting the entire several hundreds lines of text will help (you) to understand the issue ?

              #ifdef BYPASS

              do not process what is inside here
              unless BYPASS is define(d)
              that should include " ' "

              #endif

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #6

              @AnneRanch said in Should I report a bug ?:

              Are you familiar with preprocessor directives?

              I suspect @raven-worx is perfectly familiar with C, C++, preprocessors and other such :)

              that should include " ' "

              No. C++ preprocessor tokenizes input. This is different from the old C preprocessor behaviour. You can't assume everything is identical. It looks for " (double-quote) as potential strings but also ' (single-quote) as potential literal character sequences. These could be unterminated.

              You could read:
              https://gcc.gnu.org/onlinedocs/cpp/Tokenization.html#Tokenization
              https://gcc.gnu.org/onlinedocs/cpp/Traditional-lexical-analysis.html#Traditional-lexical-analysis

              You seem to have a single single-quote on a line. You are likely to have that reported as "an unterminated character". It is perhaps a warning rather than error. Behaviour varies by compiler.

              Needless to say, this is from whatever C++ compiler you are using. Nothing to do with Qt or Creator. I don't know who you have in mind for reporting a bug to.

              One online compiler (gcc):

              // Example program
              int main()
              {
              #ifdef UNUSED
              Ignore this
              but can't have this single quote
              #endif
              }
              

              generates compiler warning:
              6:8: warning: missing terminating ' character

              You can look at it via https://godbolt.org/z/Px9WanYWW

              Commenting your "free text" lines by // ... would avoid the problem.

              1 Reply Last reply
              6
              • A Anonymous_Banned275

                @raven-worx said in Should I report a bug ?:

                @AnneRanch
                but the line containing the error is not C++, thus an error is expected.

                It does NOT ignore " ' " . Why?

                why do you expect it to be ignored?
                show the whole snippet of code please.

                Are you familiar with preprocessor directives?
                They have been integral part of C since its conception.
                If you are not (familiar with preprocessor ) , how posting the entire several hundreds lines of text will help (you) to understand the issue ?

                #ifdef BYPASS

                do not process what is inside here
                unless BYPASS is define(d)
                that should include " ' "

                #endif

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by
                #7

                @AnneRanch said in Should I report a bug ?:

                Are you familiar with preprocessor directives?
                They have been integral part of C since its conception.
                If you are not (familiar with preprocessor ) , how posting the entire several hundreds lines of text will help (you) to understand the issue ?

                yes i am familiar with this concept, thank you,
                Nevertheless everything inside conditional preprocessor directives must be valid C++, which arbitrary text is not.

                I asked for a bigger snippet to get an idea where and how your noted text is used exactly.

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                5
                • A Anonymous_Banned275

                  @raven-worx said in Should I report a bug ?:

                  @AnneRanch
                  but the line containing the error is not C++, thus an error is expected.

                  It does NOT ignore " ' " . Why?

                  why do you expect it to be ignored?
                  show the whole snippet of code please.

                  Are you familiar with preprocessor directives?
                  They have been integral part of C since its conception.
                  If you are not (familiar with preprocessor ) , how posting the entire several hundreds lines of text will help (you) to understand the issue ?

                  #ifdef BYPASS

                  do not process what is inside here
                  unless BYPASS is define(d)
                  that should include " ' "

                  #endif

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #8

                  @AnneRanch
                  Are you happy with the definitive answers you got here?
                  Are you going to mark this topic as solved?
                  Or just ignore everything?

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved