Thread: #pragma

  1. #1
    Join Date
    Oct 2006


    what exactly does a #pragma?
    if possible show an example

  2. #2
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Still in the egg
    here is what google told me ?

    useful i think!

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > what exactly does a #pragma?
    A "get out of jail free card" for your compiler.
    It's a means of specifying all sorts of highly implementation specific horridness to your compiler in a fairly organised manner. Example, packing structures is a common thing.

    > if possible show an example
    Who knows, they're entirely specific to your compiler (it may not have any at all).

    Your best bet is read your compiler manual to find out what it supports, and if you're still stuck then ask what does "#pragma foo" mean for the codeMangler 3.0 compiler.
    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. labels inside the code #pragma mark label
    By nacho4d in forum C++ Programming
    Replies: 6
    Last Post: 01-11-2009, 02:50 AM
  2. #pragma pack(push,bitmap_data,1) ?
    By te5la in forum C++ Programming
    Replies: 3
    Last Post: 10-07-2008, 03:38 PM
  3. Programming a PIC 16F84 microcontroller in C
    By Iahim in forum C Programming
    Replies: 1
    Last Post: 05-13-2004, 02:23 PM
  4. what does #pragma do?
    By cbc in forum C++ Programming
    Replies: 2
    Last Post: 10-16-2003, 06:51 AM
  5. what is a pragma comment?
    By Shadow12345 in forum C++ Programming
    Replies: 9
    Last Post: 11-25-2002, 05:50 AM