Comments (5)
Changing the Makefile to "--std=c99" instead of "--std=c11" works for me. Could you send the exact error you get with c99?
from crap.
OK, I set --std=c99 and did a build. My results:
$ gcc --version
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.$ make
gcc -O2 --std=c99 -Wall -Wextra -Werror -D_GNU_SOURCE -g3 -MMD -MP -MF.deps/branch.o.d -c -o branch.o -c branch.c
cc1: warnings being treated as errors
In file included from branch.c:19:
file.h:64: error: declaration does not declare anything
make: *** [branch.o] Error 1
(Oddly, this is a different error than I got before, without the c99
option.)
When I brought down the master branch from git and tried a build, I got
this:
$ make
gcc -O2 -Wall -Wextra -Werror -D_GNU_SOURCE -g3 -MMD -MP -MF.deps/branch.o.d -c -o branch.o -c branch.c
branch.c: In function 'break_cycle':
branch.c:106: error: conflicting types for 'i'
branch.c:83: error: previous definition of 'i' was here
branch.c:106: error: 'for' loop initial declaration used outside C99 mode
branch.c: In function 'tag_released':
branch.c:123: error: 'for' loop initial declaration used outside C99 mode
branch.c:127: error: conflicting types for 'i'
branch.c:123: error: previous definition of 'i' was here
branch.c:127: error: 'for' loop initial declaration used outside C99 mode
branch.c: In function 'branch_graph':
branch.c:158: error: 'for' loop initial declaration used outside C99 mode
branch.c:160: error: 'for' loop initial declaration used outside C99 mode
branch.c:173: error: redefinition of 'i'
branch.c:158: error: previous definition of 'i' was here
...
This is basically related to declaring a variable inside a for() loop,
which is a new-ish thing in C.
Anyway, my use case is pretty simple, and cvs-fast-export did the trick
for me just fine, and I'm running a pretty old OS on my server (Ubuntu
9), and I'm probably the only person seeing these problems, so if you
want to just close this issue, I'm fine with it.
-Ed Falk
On 4/16/16 6:44 PM, rcls wrote:
Changing the Makefile to "--std=c99" instead of "--std=c11" works for
me. Could you send the exact error you get with c99?—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#14 (comment)
from crap.
Ok, the error from file.h is due to using an anonymous union. Which appears to be a c11 construct allowed by some versions of gcc in c99 but not your version.
Just removing the "union { ... }" around those two struct members in file.h would probably fix it.
Incidently, the default for your gcc is probably not c99, one that old will be defaulting to c89/c90. I don't intend to support c89/c90, I'm not as masochistic as the kernel folks :-)
from crap.
Meh; don't worry about it.
Me, I'm kind of old-school. I was doing some maintenance on the app I
use to sort my email, and realized that about half of the code in it was
K&R C.
-ed falk
On 4/19/16 10:46 AM, rcls wrote:
Ok, the error from file.h is due to using an anonymous union. Which
appears to be a c11 construct allowed by some versions of gcc in c99 but
not your version.Just removing the "union { ... }" around those two struct members in
file.h would probably fix it.Incidently, the default for your gcc is probably not c99, one that old
will be defaulting to c89/c90. I don't intend to support c89/c90, I'm
not as masochistic as the kernel folks :-)—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#14 (comment)
from crap.
I have updated various comments on exactly what compiler flags to use (-std=gnu99 -fms-extensions should work with gcc back to 3.0 or so).
from crap.
Related Issues (20)
- Problem importing CVS module HOT 13
- Relative path patch reverted HOT 2
- Leaving a dirty working tree after incremental import HOT 3
- New tip does not contain ... warning message HOT 4
- Segfault in fill_in_versions_and_parents() for version without '.' HOT 5
- Need a way to ignore CVS "cvs [update aborted]: invalid change text in ..." HOT 3
- Not an issue, just deep thank you! HOT 4
- A commit renaming a file with only a change of case breaks crap-clone on Cygwin HOT 4
- fatal error: pipeline.h: No such file or directory HOT 1
- crap fails to notice my password in .cvspas HOT 4
- Attempt to open a non-existent file HOT 2
- Support specifying a pserver password via the command-line
- Don't just accept git-forbidden tags HOT 1
- Fails to get a specific revision of a specific file HOT 3
- `libpipeline-devel` is not available on Centos8 stream. HOT 1
- Crap should honor CVS repository syntax HOT 4
- crap-clone gives up when encountering "malformed version" HOT 7
- Does not compile on Mac OS X 10.9 HOT 4
- Relative paths to local CVS repositories HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crap.