bugGNUstep - Bugs: bug #18618, When creating class files, header...

Group
 
 

bug #18618: When creating class files, header is not wrapped in #ifndef

Submitter:  Nikolaus Waxweiler <madleser>
Submitted:  Thu 28 Dec 2006 04:30:35 PM UTC
   
 
Category:  Gorm Severity:  3 - Normal
Item Group:  Change Request Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 13 Feb 2009 10:47:59 AM UTC, comment #3: 

Someone I met at FOSDEM told me that in the gcc-3.? series of compilers #import didn't work (and acted just like #include).  I haven't verified that for myself, but if so, it's a good reason to continue the practice of bracketing header file content in
#ifndef XXX
#define XXX
...
#endif /* XXX */
So that things work with all all compiler versions.


Richard Frith-Macdonald <CaS>
Group Member
Fri 13 Feb 2009 10:41:11 AM UTC, comment #2: 

import is no longer deprecated form gcc, so it is perfectly fine to use it.

Riccardo Mottola <rmottola>
Group Member
Thu 31 Jan 2008 02:07:13 PM UTC, comment #1: 

This is not really a bug. In fact one uses the "#import" directive indeast of "#include".

Matías <vargamort>
Thu 28 Dec 2006 04:30:35 PM UTC, original submission:  

It should be, to spare the poor programmer unnecessary typing or nasty surprises when the compiler complains about redefinitions. Just something simple like

#ifndef FILENAME
#define FILENAME

<Stuff goes here, including #include statements>

#endif

Using Gorm 1.1.0.

Nikolaus Waxweiler <madleser>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by rmottola (Posted a comment)
  • -email is unavailable- added by vargamort (Posted a comment)
  • -email is unavailable- added by madleser (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-02-13 rmottola Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code