git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Remove more gcc extension usage.

From
Shawn Pearce <spearce@spearce.org>
Date
Jul 10, 2006, 05:22 UTC
Message-ID
<20060710052255.GA15173@spearce.org>
In-Reply-To
<20060709073155.GP22573@lug-owl.de>
Show 5 quoted lines
> On Sat, 2006-07-08 15:03:27 -0400, Shawn Pearce <spearce@spearce.org> wrote:
> > Monday I'll look to see if there's an option that can be given to
> > the Solaris compiler to make it accept these constructs.  Maybe a
> > simple CFLAGS change in my config.mak would resolve what this patch
> > was trying to do.
So Monday turned out to be today.  The compiler version:
  $ cc -V                                                        
  cc: Forte Developer 7 C 5.4 2002/03/09
  usage: cc [ options] files.  Use 'cc -flags' for details
and from `man cc`:
  -xc99  enables C99 features:
          The following is a list of the implemented features of
          the ISO/IEC 9899:1999, Programming Language - C stan-
          dard. See the C User's Guide for a detailed explanation
          of the compiler's support for these featuers:
          o  Idempotent Qualifiers
          o  _Pragma
          o  Mixed Declarations and Code
          o  static and Other Type Qualifiers Allowed in Array
             Declarators
          o  Flexible Array Members
          o  Declarations Using Implicit int
          o  Disallowed Implicit int and Implicit Function
             Declarations
          o  Declaration in for-Loop Statement
          o  C99 Keywords
          o  __func__ Support
          o  Macros With A Variable Number of Arguments
          o  Variable Length Arrays
          o  inline Specifier For Static Functions
          o  Commenting Code with //

So neither of the constructs my patch removes are supported in this (old) compiler, although a newer one might accept them with -xc99. Yes, I tried building a pristine git-1.4.1 with -xc99. It barfed, as one would expect given the description above.

Since we don't have a newer version of cc available (not sure why) I'm stuck with needing to make the code changes in my patch just to get GIT to compile.

-- 
Shawn.
Previous: Jan-Benedict GlawNext: Jan-Benedict Glaw
Message 5 of 15 in “Remove more gcc extension usage.”
  1. Remove more gcc extension usage.Shawn Pearce, Jul 8, 2006
  2. Junio C HamanoJul 8, 2006
  3. Shawn PearceJul 8, 2006
  4. Jan-Benedict GlawJul 9, 2006
  5. Shawn PearceJul 10, 2006
  6. Jan-Benedict GlawJul 10, 2006
  7. Pavel RoskinJul 10, 2006
  8. Jan-Benedict GlawJul 10, 2006
  9. Pavel RoskinJul 10, 2006
  10. Jan-Benedict GlawJul 10, 2006
  11. Pavel RoskinJul 10, 2006
  12. Junio C HamanoJul 10, 2006
  13. Jan-Benedict GlawJul 10, 2006
  14. Junio C HamanoJul 10, 2006
  15. Paul JakmaJul 12, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.