<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'__attribute__ in C programing' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread '__attribute__ in C programing' posted on the 'LINUX programming' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sun, 19 May 2013 04:01:37 -0700</pubDate>
    <lastBuildDate>Sun, 19 May 2013 04:01:37 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>__attribute__ in C programing</title>
      <link>http://www.programmersheaven.com/mb/Linux/58082/58082/__attribute__-in-c-programing/</link>
      <description>Does anybody know what the __attribute__ in certain .c and .h files in Linux means?&lt;br /&gt;
Know where I can get additional info?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Deepak&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/58082/58082/__attribute__-in-c-programing/</guid>
      <pubDate>Tue, 27 Mar 2001 05:23:45 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: __attribute__ in C programing</title>
      <link>http://www.programmersheaven.com/mb/Linux/58082/58105/re-__attribute__-in-c-programing/#58105</link>
      <description>I have never seen __attribute__ in a c or .h file, is this in a program ? or is this in the standard gcc header files ? If its in a program, look into the code, and check.&lt;br /&gt;
&lt;br /&gt;
: Does anybody know what the __attribute__ in certain .c and .h files in Linux means?&lt;br /&gt;
: Know where I can get additional info?&lt;br /&gt;
: &lt;br /&gt;
: Thanks,&lt;br /&gt;
: Deepak&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/58082/58105/re-__attribute__-in-c-programing/#58105</guid>
      <pubDate>Tue, 27 Mar 2001 10:02:37 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: __attribute__ in C programing</title>
      <link>http://www.programmersheaven.com/mb/Linux/58082/58233/re-__attribute__-in-c-programing/#58233</link>
      <description>: I have never seen __attribute__ in a c or .h file, is this in a program ? or is this in the standard gcc header files ? If its in a program, look into the code, and check.&lt;br /&gt;
: &lt;br /&gt;
: : Does anybody know what the __attribute__ in certain .c and .h files in Linux means?&lt;br /&gt;
: : Know where I can get additional info?&lt;br /&gt;
: : &lt;br /&gt;
: : Thanks,&lt;br /&gt;
: : Deepak&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
Do a grep for __attribute__ in the source files of Linux components.&lt;br /&gt;
&lt;br /&gt;
D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/58082/58233/re-__attribute__-in-c-programing/#58233</guid>
      <pubDate>Tue, 27 Mar 2001 21:37:14 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: __attribute__ in C programing</title>
      <link>http://www.programmersheaven.com/mb/Linux/58082/58289/re-__attribute__-in-c-programing/#58289</link>
      <description>: : I have never seen __attribute__ in a c or .h file, is this in a program ? or is this in the standard gcc header files ? If its in a program, look into the code, and check.&lt;br /&gt;
: : &lt;br /&gt;
: : : Does anybody know what the __attribute__ in certain .c and .h files in Linux means?&lt;br /&gt;
: : : Know where I can get additional info?&lt;br /&gt;
: : : &lt;br /&gt;
: : : Thanks,&lt;br /&gt;
: : : Deepak&lt;br /&gt;
: : : &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: Do a grep for __attribute__ in the source files of Linux components.&lt;br /&gt;
: &lt;br /&gt;
: D&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
Check out &lt;a href="http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC84"&gt;http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC84&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/58082/58289/re-__attribute__-in-c-programing/#58289</guid>
      <pubDate>Wed, 28 Mar 2001 06:38:06 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: __attribute__ in C programing</title>
      <link>http://www.programmersheaven.com/mb/Linux/58082/58305/re-__attribute__-in-c-programing/#58305</link>
      <description>Thank you,&lt;br /&gt;
&lt;br /&gt;
Actually I was searching for this sort of stuff for my code in C, and was wondering what the option was for compiling in 1byte boundary.&lt;br /&gt;
&lt;br /&gt;
: : : I have never seen __attribute__ in a c or .h file, is this in a program ? or is this in the standard gcc header files ? If its in a program, look into the code, and check.&lt;br /&gt;
: : : &lt;br /&gt;
: : : : Does anybody know what the __attribute__ in certain .c and .h files in Linux means?&lt;br /&gt;
: : : : Know where I can get additional info?&lt;br /&gt;
: : : : &lt;br /&gt;
: : : : Thanks,&lt;br /&gt;
: : : : Deepak&lt;br /&gt;
: : : : &lt;br /&gt;
: : : &lt;br /&gt;
: : : &lt;br /&gt;
: : &lt;br /&gt;
: : Do a grep for __attribute__ in the source files of Linux components.&lt;br /&gt;
: : &lt;br /&gt;
: : D&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: Check out &lt;a href="http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC84"&gt;http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC84&lt;/a&gt;&lt;br /&gt;
: &lt;br /&gt;
: D&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/58082/58305/re-__attribute__-in-c-programing/#58305</guid>
      <pubDate>Wed, 28 Mar 2001 09:23:05 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: __attribute__ in C programing</title>
      <link>http://www.programmersheaven.com/mb/Linux/58082/91914/re-__attribute__-in-c-programing/#91914</link>
      <description>: Does anybody know what the __attribute__ in certain .c and .h files in Linux means?&lt;br /&gt;
&lt;br /&gt;
: Know where I can get additional info?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is quite easy: info gcc.&lt;br /&gt;
&lt;br /&gt;
The keyword __attribute__ ((lalala)) tells gcc,&lt;br /&gt;
&lt;br /&gt;
that function is not just a common function. It can make&lt;br /&gt;
&lt;br /&gt;
many different things with it, due the lalala.&lt;br /&gt;
&lt;br /&gt;
Read the section "C extensions"-&amp;gt;"Function attributes"&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/58082/91914/re-__attribute__-in-c-programing/#91914</guid>
      <pubDate>Tue, 18 Dec 2001 12:25:28 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: __attribute__ in C programing</title>
      <link>http://www.programmersheaven.com/mb/Linux/58082/426078/re-__attribute__-in-c-programing/#426078</link>
      <description>The article is since 2001 but I will answer anyway.&lt;br /&gt;
&lt;br /&gt;
Take for example this code:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
struct Packaging {
    char c;
    int i;
} Packaging;

sizeof(Packaging) will be 8 Bytes.
&lt;/pre&gt;&lt;br /&gt;
or you could do:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#pragma pack(push)
#pragma pack(1)

struct Packaging {
    char c;
    int i;
} Packaging;

#pragma pack(pop)

sizeof(Packaging) will be 5 Bytes because of aliasing.
&lt;/pre&gt;&lt;br /&gt;
We can use __attribute__ instead of #pragma, like this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
struct Packaging {
    char c;
    int i;
} __attribute__((packed)) Packaging;
&lt;/pre&gt;&lt;br /&gt;
It will have the same effect as pragma.&lt;br /&gt;
And there are a lot of other uses for __attribute__.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/58082/426078/re-__attribute__-in-c-programing/#426078</guid>
      <pubDate>Mon, 05 Dec 2011 01:04:40 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: __attribute__ in C programing</title>
      <link>http://www.programmersheaven.com/mb/Linux/58082/428934/re-__attribute__-in-c-programing/#428934</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I have just noticed that all my files have the attribute C. I've been running XP on the machine for several years, and I never noticed that before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.hyphentechnology.com/SEO-Company-India.html"&gt;SEO Company India&lt;/a&gt; | &lt;a href="http://www.hyphentechnology.com/SEO-Services-India.html"&gt;SEO Services India&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/58082/428934/re-__attribute__-in-c-programing/#428934</guid>
      <pubDate>Wed, 27 Jun 2012 02:15:59 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: __attribute__ in C programing</title>
      <link>http://www.programmersheaven.com/mb/Linux/58082/428935/re-__attribute__-in-c-programing/#428935</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I have just noticed that all my files have the attribute C. I've been running XP on the machine for several years, and I never noticed that before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.hyphentechnology.com/SEO-Company-India.html"&gt;SEO Company India&lt;/a&gt; | &lt;a href="http://www.hyphentechnology.com/SEO-Services-India.html"&gt;SEO Services India&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/58082/428935/re-__attribute__-in-c-programing/#428935</guid>
      <pubDate>Wed, 27 Jun 2012 02:17:51 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
  </channel>
</rss>