| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#define M2(a,b)
warn about the uses M2(x,) or M2(,y) or M2(,).
The empty arguments are still handled correctly. These warnings are only to
make it easier to port to systems where the system cpp does not handle empty
arguments and where one does not want to use the perl cpp instead.
Patch from Erik Schnetter.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4213 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
convert the macro value to either 0 or 1 before returning it.
Otherwise things fail badly if the macro is defined but empty: The
returned value is then not an integer, and cpp.pl would keep both the
#if and the #else branch of an if statement.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4205 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the last macro argument is empty, it thinks there is one argument too
few. That is, the following code
#define M2(a,b)
M2(x,)
leads to an error message stating that M2 was used with only a single
argument. This is wrong, as it is called with two arguments, where
the second argument is the empty string. After reading the GNU cpp
manual, I think that the ANSI standard requires that empty arguments
must be handled.
The problem is that the routine SplitArgs that decodes the macro
arguments cannot distinguish between an empty last argument and no
argument, as both are represented by an empty string. I change the
routine so that an empty string always means "empty argument". This
means that SplitArgs cannot be called any more if there are no
arguments -- but this does not matter. I place a corresponding if
statement around the call.
Empty macro arguments may cause problems on some system. A later
patch will produce warnings or errors for them.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4179 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4155 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
token concatenation.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4153 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4152 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3610 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3590 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
problems. PR 1467 - patch from Ian Hawke.
This patch also allows space on a line before a pre-processor directive.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3216 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
parentheses.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3178 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2814 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2808 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2806 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
after it has been given execute permissions.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2797 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2754 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
A couple of bugfixes for diagnostic code.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2750 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Einstein thorns and pass testsuite with this.
Added output of # line stuff which si handy for debugging.
Fixed hopefully the last place where it might try to replace a token which
is in a string.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2468 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
| |
Better handling of things in strings.
Still doesn't work for ADM, so I was obviously too optinmistic in my
last commit; you probably don;t want to use it yet.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2467 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you feel brave and want to use this, edit
configs/<config>/config-data/make.config.defn
and change the
CPP = <whatever>
line to
CPP = $(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl
I have tested this on the Fortran files from WaveToyF* and it works ok.
Caveats: It will merrily go into a loop with recursive macro definitions.
Some of its error messages may not be too friendly at the moment.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2466 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
between cpp
on all the architectures.
Almost works correctly for dependencies - still a bug or two to track down.
Macros of the form #define a(b) not yet supported.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@927 17b73243-c579-4c4c-a9d2-2d5706c11dac
|