Thread: Which one has priority ?

  1. #1
    Registered User
    Join Date
    Feb 2020

    Which one has priority ?

    Hello and i'm sorry i opened a new topic for a question that may be embarrassing.

    Which one has priority in the statement of the below code ? Pointer is typecasted first and then the adress the pointer points to is incremented and dereferenced?

    temp = *(uint32_t *)(frame + 1);
    void fun1()
         uint8_t frame[256];
    void fun2(uint8_t *frame)
         uint32_t temp;
         temp = *(uint32_t *)(frame + 1);
         printf("%d", temp); }

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    (frame + 1)
    is cast to
    (uint32_t *)
    and then dereferenced
    and the result assigned to
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. p++ and ++p priority
    By h255874 in forum C Programming
    Replies: 6
    Last Post: 09-20-2019, 07:30 AM
  2. Priority queues
    By sigur47 in forum C++ Programming
    Replies: 1
    Last Post: 02-07-2012, 07:22 PM
  3. XNa C# visibility priority
    By Shingetsu Kurai in forum Game Programming
    Replies: 2
    Last Post: 01-07-2012, 06:55 AM
  4. Process priority
    By mikahell in forum Game Programming
    Replies: 5
    Last Post: 07-26-2006, 04:02 PM
  5. Priority
    By siavoshkc in forum Windows Programming
    Replies: 1
    Last Post: 01-18-2006, 01:57 AM

Tags for this Thread