Announcement

Collapse
No announcement yet.

Linux 5.15's New "-Werror" Behavior Is Causing A Lot Of Pain

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by oiaohm View Post
    This is a case indepe you need to read the C++ standards in this case C++11. Yes C++11 design is based off a draft versions of C11. Yes that include the draft C11 versions that allow for your conversion order to be totally upside down.
    First of all, I think andreano mentioned C++17 only to run those tests. I don't think this is about C++.

    Then, regarding C++11. Wikipedia has this:
    C++11 was published as ISO/IEC 14882:2011 in September 2011 and is available for a fee. The working draft most similar to the published C++11 standard is N3337, dated 16 January 2012; it has only editorial corrections from the C++11 standard.
    N3337 is here: http://www.open-std.org/jtc1/sc22/wg...2012/n3337.pdf

    Chapter 7.1.6.2, page 146, table 10 shows that the "signed", "signed int" and "int" specifiers all refer to the same type: "int".

    Just as in C11, final draft.

    Also the same 5 rules for "usual arithmetic conversion" as quoted by andreano are there in C++11 N3337, in chapter 5 on page 84.

    Originally posted by oiaohm View Post
    But C++11 you are allowed upside down auto conversion. Yes you are allowed the rank system screwed up that way with C++11 as well.
    How exactly? I doubt that for C++11 N3337. Are you sure that's not you not finding the relevant text parts?

    Comment


    • Originally posted by indepe View Post
      Then, regarding C++11. Wikipedia has this:
      C++11 was published as ISO/IEC 14882:2011 in September 2011 and is available for a fee. The working draft most similar to the published C++11 standard is N3337, dated 16 January 2012; it has only editorial corrections from the C++11 standard.
      N3337 is here: http://www.open-std.org/jtc1/sc22/wg...2012/n3337.pdf
      Indepe the bad news see the editorial corrections and the most similar. This means the n3337 means the non goofed version.

      C++11 N3337 from Jan 2012 is not ISO/IEC 14882:2011 from September 2011. If you are looking for the contents of C++11 N3337. formally stamped into C++ standard you are looking to C++14 not C++11. N3337 is correct with the C11 final draft instead of C11 earlier draft. Of course since N3337 not the formal ISO standard document so a compiler implement to C11 standard does not have to follow C++11 N3337(you hope it does). Yes the broken ISO/IEC 14882:2011 is the only thing you have to follow to claim C++11 compatibility that still based off a earlier C11 non final draft that is missing that section. Yes updating the C11 imported parts changed or altered in drafts into C++11 is classed by C++ standard group as only editorial corrections. Yes changes that alter the complete functionality of the standard get call editorial corrections.

      indepe this is a real area of cursed where you have to be very careful that you are looking at the right document. Yes the words "most similar" should have been a warning as well about N3337.

      ISO standard body hosting broken standards that you have to pay for while the public available for free version of the ISO standard that is a draft is not broken that a 1/4 of year newer that not broken seams to be a hobby of ISO standards. This does not happen just with C standards its happened with ISO quality standards and so on its just the way the ISO standard body works. indepe yes this is a trap you are not aware you have to watch out for. Yes Microsoft Office Open XML getting a ISO standard while not being functional is another classic example of ISO standard body not really care about the quality of the submits but more about the money they can make selling the standards.

      Yes some of the problem here is the ISO standard body. Thinking C++11 was being released based on a non final draft of C11 that should have been enough for the standard body to go no this is not acceptable to release as it based on another standard that is not final. Of course since this was not blocked we now have a ISO C++11 that is botched.

      Comment


      • Originally posted by oiaohm View Post
        Indepe the bad news see the editorial corrections and the most similar. This means the n3337 means the non goofed version.
        No, having "editorial corrections" does not mean that it is goofed. That is not evidence of that at all.

        The Wikipedia information is sourced from isocpp.org, which has this:


        C++11 is the ISO C++ standard formally ratified by a 21-0 national vote in August 2011. This public working paper is the January 2012 working draft, and contains the C++11 standard plus minor editorial changes.
        (Added highlighting)

        where "public working paper" links to N3337: http://www.open-std.org/jtc1/sc22/wg...2012/n3337.pdf

        Obviously, the changes you are talking about would not be "minor". Not at all.

        I have not found anything on the internet that could even remotely confirm your claims, not even a hint.

        Comment


        • Adding to my preceding post:

          Originally posted by oiaohm View Post
          C++11 N3337 from Jan 2012 is not ISO/IEC 14882:2011 from September 2011.
          Here is the list of the editorial changes that were made for N3337, since N3291, which is from April 5, 2011:


          Apparently, they keep track of things:

          Comment


          • Originally posted by indepe View Post
            Adding to my preceding post:

            Here is the list of the editorial changes that were made for N3337, since N3291, which is from April 5, 2011:


            Apparently, they keep track of things:
            http://www.open-std.org/jtc1/sc22/wg21/docs/papers/
            Except that does not tell you that N3291 was used for "ISO/IEC 14882:2011 from September 2011"

            C++11 is the ISO C++ standard formally ratified by a 21-0 national vote in August 2011.
            That is missing what version of the standard did they vote on in August 2011.

            indepe dealing with ISO standards body is dealing with a bureaucratic nightmare. National vote can be up a 3 years difference between the current working draft at the time and the one they are voting on. Yes those approval votes by ISO normally do not release what draft they in fact voted on as this would undermine their means to sell the ISO standard document.

            Yes indepe a lot of people do what you are doing we will look though the drafts at open-std and well will then find the ISO around same time frame right. Problem is the answer to that is unlikely. The lag between what the working group is working on and what is being put up to ISO for ratification is a lot.

            Originally posted by indepe View Post
            I have not found anything on the internet that could even remotely confirm your claims, not even a hint.
            That because the internet cannot answer the question. Paying the money and buying the standard to find out what one it is in fact voted is how you find out that the ISO approved and the working drafts are very different time frames. Good part is generally the versions that people who don't buy the standard use will be a better quality than the standard document itself.

            Yes the Nxxxx number that the ISO approved was based on is not include on the ISO approved paper. Nothing to make life harder for those who get the ISO standard to see what has been updated from the standard document that was approved.

            Comment


            • Originally posted by oiaohm View Post
              Except that does not tell you that N3291 was used for "ISO/IEC 14882:2011 from September 2011"
              It doesn't, however it gives many examples for "editorial changes" for N3337.

              Originally posted by oiaohm View Post
              That is missing what version of the standard did they vote on in August 2011.

              indepe dealing with ISO standards body is dealing with a bureaucratic nightmare. National vote can be up a 3 years difference between the current working draft at the time and the one they are voting on. Yes those approval votes by ISO normally do not release what draft they in fact voted on as this would undermine their means to sell the ISO standard document.

              The following quote from open-std.org has a suggestion (though not really definite): http://www.open-std.org/jtc1/sc22/wg21/docs/standards

              ISO/IEC JTC1/SC22/WG21 has produced the standard ISO/IEC 14882:2020 on the programming language C++. It was published 2020-12.

              Published ISO and IEC standards can be purchased from a member body of ISO or IEC.

              The first edition of ISO/IEC 14882 was published in 1998. A technical corrigendum was approved in 2003. and the standard was published again as the ISO/IEC 14882:2003 edition, published 2003-10-16. The ISO/IEC 14882:2011 3rd editon was published 2011-09-01. The ISO/IEC 14882:2014 4th edition was published 2014-12. The ISO/IEC 14882:2017 5th edition was published 2017-12. The ISO/IEC 14882:2020 6th edition was published 2020-12.

              A draft for the 2003 edition with the combined C++ standard from 1998 and the corrigendum is available in N1316.
              A draft for the 2011 edition is available in N3242.
              A draft for the 2014 edition is available in N3797.
              A draft for the 2017 edition is available in N4659.
              A draft for the 2020 edition is available in N4849.
              This suggests N3242 or later. (Though not definite.)
              N3242 is from 2011-02-28 and also available publicly, for everyone to read: http://www.open-std.org/jtc1/sc22/wg...2011/n3242.pdf

              It also contains the type equality of int types, the above 5 rules of arithmetic conversion, and the clarification that typedef does not create a new type.

              EDIT: ----

              I also went back 3 years and found N2521 from 2008-02-04: http://www.open-std.org/jtc1/sc22/wg...2008/n2521.pdf

              In early 2008, it already contained the above 5 rules for "usual arithmetic conversions", and the clarification that typedef doesn't create a new type. (I have not yet found explicit mention of the type equalities for int types, however that is not required for defined behavior.)
              Last edited by indepe; 18 September 2021, 11:43 PM.

              Comment


              • Adding to the preceding post:

                The early 2008 draft N2521 also contains the type equalities for int types, just in Table 9 instead of Table 10.

                (Saying for example that "signed int", "int" and "signed" are one and the same type.)

                Comment


                • Originally posted by indepe View Post
                  This suggests N3242 or later. (Though not definite.)
                  Information technology — Programming languages — C++

                  This here tells you how many pages C++11 should have. 1338 pages for C++11 and N3242 is only 1334. So that is not the final document. Yes the draft and the final have the same number of cover pages. 2011-02-28 is the N3242 of that document so 4-5 months before the vote. It possible that N3242 was the documented that went into the vote and got altered in the voting process to get everyone agreement.

                  Originally posted by indepe View Post
                  N3242 is from 2011-02-28 and also available publicly, for everyone to read: http://www.open-std.org/jtc1/sc22/wg...2011/n3242.pdf
                  In that document. There are bits like this.
                  3.9.1 Fundamental types page 76
                  11[Note:Even if the implementation defines two or more basic types to have the same value representation,they are nevertheless different types.— end note]
                  This is not fully written out in any of the drafts but is fully written out in the C++11 ISO standard document if you to spent the money back then to buy it. Remember you cannot go and buy it now. That section makes table 10 nothing more than a guide line implementation can break.

                  This is the problem. You can think of these drafts as nothing different to draft laws where in the approval process items can be changed. Bad part unlike the laws that after they are past they are public to everyone these alterations to ISO standards are only open to those pay and once withdrawn basically hidden. Yes the fact the standard will come hidden means there is no real punishment for abusing the standard process.

                  Really ISO system annoying mess. This also explains why people don't go into explaining why gcc or llvm has particular warn messages.

                  You are keeping on working with the idea this is a far and balanced system. Remember some company with a contract with a government with a government somewhere that everything they provided will be to ISO standard is not going to vote for a standard that going to get themselves in breach of contract.

                  Greed and money is also part of the ISO process.

                  Comment


                  • Originally posted by oiaohm View Post
                    This here tells you how many pages C++11 should have. 1338 pages for C++11 and N3242 is only 1334. So that is not the final document.[/FONT]
                    Why would anyone expect any draft and the final document to have the exact same number of pages? I would expect at least a few editorial changes, perhaps an introduction, a page header on the top of each page, different fonts or formatting, perhaps a chapter describing the differences to the previous standard, and so on. N3337, by the way, has 1310 numbered pages + 14 for contents and front page. So actually less again. Not that it matters.

                    It doesn't particularly matter to me if N3242 is "the one", or if N3337 or even N2521 is closer. All of these (and more) include the relevant definitions, in a solid progression.

                    Originally posted by oiaohm View Post
                    In that document. There are bits like this.
                    3.9.1 Fundamental types page 76
                    "11[Note:Even if the implementation defines two or more basic types to have the same value representation,they are nevertheless different types.— end note]"
                    That sentence has no consequence regarding matters that we discuss. It is not even specifically about integer types. Unless of course the implementation defines those types in a really really bad way, can't stop that from happening.

                    So given that you are apparently not in a position to provide any other relevant links or quotes, I don't think there is anything left to discuss.

                    Comment


                    • Originally posted by indepe View Post
                      Why would anyone expect any draft and the final document to have the exact same number of pages? I would expect at least a few editorial changes, perhaps an introduction, a page header on the top of each page, different fonts or formatting, perhaps a chapter describing the differences to the previous standard, and so on. N3337, by the way, has 1310 numbered pages + 14 for contents and front page. So actually less again. Not that it matters.
                      This is just you have not handled many different ISO standard. ODF for example the final draft before a new ISO ODF standard will have the exact same page count.

                      Working Draft, Standard for ProgrammingLanguage C++Note: this is an early draft. It’s known to be incomplet and incorrekt, and it has lots of badformatting
                      All the drafts you are finding of the C and C++ standard are what are called Working Drafts. Do note that they still call them early drafts not final drafts. A final draft is not meant to contain any bad formatting or errors. Final draft is meant to match to the standard exactly other than its front cover page. So no formatting changes allowed no differences to what gets approved.

                      This is a problem C++ and C standards on ISO are not publishing their final drafts.

                      Originally posted by indepe View Post
                      I would expect at least a few editorial changes, perhaps an introduction, a page header on the top of each page, different fonts or formatting, perhaps a chapter describing the differences to the previous standard, and so on.
                      Everything you listed here cannot be done on ISO final draft. If you have to-do any of this to final draft the complete document has to be re-versioned and the voting process started again by ISO rules. This is one of the advantages of not publishing your final drafts is that outside people cannot review them and officially notify ISO standard body of flaw in final draft causing you to have to restart the voting process as well as make a new final draft. Yes by ISO rules finals drafts can only be published before the standard approved for release(as in before the vote) but are not mandated to be published.

                      Fun part here is a final draft that has been published as working draft before the standard is released by ISO rules it allowed to have a cover page added stating it was the final draft after the standard is voted in. Again the documents you are finding are not final drafts. So they are not what is 100 percent in the written standard that is ISO stamped and it the document that is ISO stamped that you have obey to be conforming.

                      The reality is the C and C++ standards with ISO are really exploiting a loop hole that loop hole limits peer review of the C and C++ standard and also makes it impossible if you did not buy the standard at the time to get the old ISO C and C++ standard documents. Yes the notification that X working draft is the final draft is allowed to be after ISO body stops selling the standard.

                      indepe it kind of a hard reality is not. That getting the exact copies of old ISO C and C++ standard by the internet is next to impossible. The worst part is that the drafts that you can get on the internet have had more than what you described as allowed changed done them in the working draft to final draft stage. So lot of what people believe is C11 C++11 and so on is not what the real document from the ISO standard body in fact had written.

                      Really I wish future C and C++ standard moved to in fact releasing the final drafts. Heck make the working drafts the same format as the final draft would be a insanely good idea particularly with the example of C90 vs C89 for how badly a standard can be ruined when person attempts to change the formatting and does it wrong then people fail to notice.

                      indepe remember you said different fonts. There are cases where a different font can change the meaning of a bit of text. There is a reason why a lot of changes are forbid in final drafts because those changes could alter the documents meaning in a big way.

                      There are quite a few ISO standards that do in fact either open publish final drafts or publish final drafts as working drafts and release note once ISO stops selling standard that X working draft was in fact the final draft for standard no longer for sale by ISO.

                      Comment

                      Working...
                      X