Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. What the hell gcc?

What the hell gcc?

Scheduled Pinned Locked Moved The Weird and The Wonderful
designcomgraphicsiot
24 Posts 6 Posters 60 Views 1 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.
  • 0 0x01AA

    Quote:

    I hate assuming compiler bugs

    No, it is definitely not a compiler bug. It is a defined behaviour, there are lots of documents in www which explain the background.

    H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #21

    0x01AA wrote:

    It is a defined behaviour

    That's precisely what I was afraid of. :~

    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

    0 1 Reply Last reply
    0
    • H honey the codewitch

      0x01AA wrote:

      It is a defined behaviour

      That's precisely what I was afraid of. :~

      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

      0 Offline
      0 Offline
      0x01AA
      wrote on last edited by
      #22

      In a message above, you mentioned, there is no std available. But maybe in your environement some kind of bit_cast is available? If not, I think a similar behaviour (to inform the compiler [optimizer]) can be achived with reinterpret_cast, but at the moment I don't remember the document, from where I got this :( Sorry, for my strange English ...

      H 1 Reply Last reply
      0
      • 0 0x01AA

        In a message above, you mentioned, there is no std available. But maybe in your environement some kind of bit_cast is available? If not, I think a similar behaviour (to inform the compiler [optimizer]) can be achived with reinterpret_cast, but at the moment I don't remember the document, from where I got this :( Sorry, for my strange English ...

        H Offline
        H Offline
        honey the codewitch
        wrote on last edited by
        #23

        It's possible I could do it with reinterpret_cast? I dunno

        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

        0 1 Reply Last reply
        0
        • H honey the codewitch

          It's possible I could do it with reinterpret_cast? I dunno

          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

          0 Offline
          0 Offline
          0x01AA
          wrote on last edited by
          #24

          Try it ;) I think it simply informs the compiler 'you are aware' about a maybe not safe conversion ...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups