* [PATCH] configure flag for source_location/location_t merge
@ 2004-05-28 0:36 Per Bothner
2004-05-28 0:39 ` DJ Delorie
2004-06-08 20:30 ` patch ping: " Per Bothner
0 siblings, 2 replies; 6+ messages in thread
From: Per Bothner @ 2004-05-28 0:36 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
I've updated my source_location patch (to use line-map'd int's for
input_location, EXPR_LOCATION, etc) for the mainline, but there are
still regressions plus support is needed for non-cpplib front-ends.
To make it easier for others to try the functionality and to fix
remaining problems (and it make it harder to break the patch ...), I
propose checking in the patch, but have it be conditionally compiled
depending on a configure flag. The attched patch uses the configure
flag --enable-mapped-location and the macro USE_MAPPED_LOCATION, but
other names may be better. In any case, this is intended to be
transitional, with the goal of permanently enabling it soon. Also,
since the flag is only intended for GCC developers, I don't think it
needs to be added to the documentation.
If this flag is OK, then follow-up submissions will include the actual
source-location patch, modified to depend on the flag. (Of course I'll
try to minimize the number of conditional sections in .c files.)
--
--Per Bothner
per@bothner.com http://per.bothner.com/
[-- Attachment #2: loc-flag.patch --]
[-- Type: text/plain, Size: 846 bytes --]
2004-05-27 Per Bothner <per@bothner.com>
* configure.ac: New --enable-mapped-location sets USE_MAPPED_LOCATION.
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.38
diff -u -r2.38 configure.ac
--- configure.ac 25 May 2004 19:46:49 -0000 2.38
+++ configure.ac 27 May 2004 19:40:12 -0000
@@ -509,6 +509,15 @@
AC_SUBST(valgrind_path_defines)
AC_SUBST(valgrind_command)
+AC_ARG_ENABLE(mapped-location,
+[ --enable-mapped-location location_t is fileline integer cookie],,
+enable_mapped_location=no)
+
+if test "$enable_mapped_location" = yes ; then
+ AC_DEFINE(USE_MAPPED_LOCATION, 1,
+[Define if location_t is fileline integer cookie.])
+fi
+
# Enable code coverage collection
AC_ARG_ENABLE(coverage,
[ --enable-coverage[=LEVEL]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] configure flag for source_location/location_t merge
2004-05-28 0:36 [PATCH] configure flag for source_location/location_t merge Per Bothner
@ 2004-05-28 0:39 ` DJ Delorie
2004-05-28 0:53 ` Per Bothner
2004-06-08 20:30 ` patch ping: " Per Bothner
1 sibling, 1 reply; 6+ messages in thread
From: DJ Delorie @ 2004-05-28 0:39 UTC (permalink / raw)
To: per; +Cc: gcc-patches
We can't just do "CFLAGS=-DMAPPED_LOCATION make cc1" ?
Sigh, so much for the good old days... ;-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] configure flag for source_location/location_t merge
2004-05-28 0:39 ` DJ Delorie
@ 2004-05-28 0:53 ` Per Bothner
2004-05-28 1:58 ` Andreas Schwab
0 siblings, 1 reply; 6+ messages in thread
From: Per Bothner @ 2004-05-28 0:53 UTC (permalink / raw)
To: DJ Delorie; +Cc: gcc-patches
DJ Delorie wrote:
> We can't just do "CFLAGS=-DMAPPED_LOCATION make cc1" ?
>
> Sigh, so much for the good old days... ;-)
That would be acceptable to me, but it might be more confusing to
someone looking at the source. I.e. "where is MAPPED_LOCATION coming
from?".
The more important question is whether I should merge in the
source_location patches even though they're unfinished, and use
conditional compilation to enable/disable the feature.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] configure flag for source_location/location_t merge
2004-05-28 0:53 ` Per Bothner
@ 2004-05-28 1:58 ` Andreas Schwab
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2004-05-28 1:58 UTC (permalink / raw)
To: Per Bothner; +Cc: DJ Delorie, gcc-patches
Per Bothner <per@bothner.com> writes:
> DJ Delorie wrote:
>
>> We can't just do "CFLAGS=-DMAPPED_LOCATION make cc1" ?
>> Sigh, so much for the good old days... ;-)
>
> That would be acceptable to me, but it might be more confusing to someone
> looking at the source. I.e. "where is MAPPED_LOCATION coming from?".
A strategically placed comment might work wonders. :-)
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* patch ping: configure flag for source_location/location_t merge
2004-05-28 0:36 [PATCH] configure flag for source_location/location_t merge Per Bothner
2004-05-28 0:39 ` DJ Delorie
@ 2004-06-08 20:30 ` Per Bothner
2004-06-09 2:30 ` Richard Henderson
1 sibling, 1 reply; 6+ messages in thread
From: Per Bothner @ 2004-06-08 20:30 UTC (permalink / raw)
To: gcc-patches
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01755.html
--
--Per Bothner
per@bothner.com http://per.bothner.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: patch ping: configure flag for source_location/location_t merge
2004-06-08 20:30 ` patch ping: " Per Bothner
@ 2004-06-09 2:30 ` Richard Henderson
0 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2004-06-09 2:30 UTC (permalink / raw)
To: Per Bothner; +Cc: gcc-patches
On Tue, Jun 08, 2004 at 12:40:19PM -0700, Per Bothner wrote:
> http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01755.html
Sure, I guess. Anything to move this conversion forward.
r~
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-06-09 0:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-28 0:36 [PATCH] configure flag for source_location/location_t merge Per Bothner
2004-05-28 0:39 ` DJ Delorie
2004-05-28 0:53 ` Per Bothner
2004-05-28 1:58 ` Andreas Schwab
2004-06-08 20:30 ` patch ping: " Per Bothner
2004-06-09 2:30 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).