Closed Bug 1666422 Opened 5 years ago Closed 5 years ago

gcc-10: error: ‘uint8_t’ is not a member of ‘std’; did you mean ‘uint8_t’?

Categories

(Core :: MFBT, defect)

defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 --- unaffected
firefox83 --- fixed

People

(Reporter: Sylvestre, Assigned: sg)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Seems to be caused by bug 1665927

With :

  • gcc 10.2.0-9
  • libstdc++-10-dev 10.2.0-9
  • libc6-dev 2.31-0experimental0

Available to test patches if it helps

In file included from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Compression.h:14,
                 from /root/firefox-gcc-last/mfbt/Compression.cpp:7:
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Result.h:231:18: error: ‘uint8_t’ is not a member of ‘std’; did you mean ‘uint8_t’?
  231 |     S == 1, std::uint8_t,
      |                  ^~~~~~~
In file included from /usr/include/stdint.h:37,
                 from /usr/lib/gcc/x86_64-linux-gnu/10/include/stdint.h:9,
                 from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/system_wrappers/stdint.h:3,
                 from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Types.h:19,
                 from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Assertions.h:21,
                 from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Compression.h:12,
                 from /root/firefox-gcc-last/mfbt/Compression.cpp:7:
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:24:19: note: ‘uint8_t’ declared here
   24 | typedef __uint8_t uint8_t;
      |                   ^~~~~~~

I think we should add #include <cstdint> (or remove std:: which would fix this under these circumstances, but still we don't explicitly include stdint.h either, and using cstdint is the more C++-ish variant)

Seems that it is indeed fixing the issue (include cstdint)
do you want me to push a patch?

(In reply to Sylvestre Ledru [:Sylvestre] from comment #2)

Seems that it is indeed fixing the issue (include cstdint)
do you want me to push a patch?

Ah, I already submitted one :)

Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e6e0bb6e9db Add missing include for cstdint. r=sylvestre
Pushed by rmaries@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/5be1fd0620eb Add missing include for cstdint. r=sylvestre a=bustage-fix
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

Set release status flags based on info from the regressing bug 1665927

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: