public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Re: fast-fixinc losing badly on alpha-dec-osf4.0a
1999-06-30 23:07 fast-fixinc losing badly on alpha-dec-osf4.0a korbb
@ 1999-06-03 22:32 ` Jeffrey A Law
0 siblings, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 1999-06-03 22:32 UTC (permalink / raw)
To: korbb; +Cc: egcs-bugs
In message < 19990603142433.21538.qmail@egcs.cygnus.com >you write:
> > They fall into two basic categories.
> >
> > 1. Failure to fix the _IO macros in many files.
>
> I will work on this today:
>
> Applying No_Double_Slash to ./bktest/fix.h
> Applying Io_Def_Quotes to ./bktest/fix.h
> Fixed: ./bktest/fix.h
>
> Io_Def_Quotes did not do anything :-(
Looks like your fix did the trick on these. Thanks!
> > 2. Failure to turn C++ comments into a C comment.
>
> Very odd. What is the name of the file? My fixincl program
> stripped out the '//' comment from your sample.
>
> The no_double_slash fix omits all files containing any of
>
> CC/
> cxx/
> ++/
>
> in their names. Also, the fix is only applied if either:
OK. One of them has a ++. It appears inside a macro like this:
#define PROBE_START(PD,a,b,c,d,e) \
MACRO_BEGIN \
if (probe_smp) { \
probe_config_t *PT = (PD)->pb_table; \
int np; \
np = (PT) ? PT->type : 0; \
lock_read(&(PD)->pb_lock); \
if (np > 1) { \
unsigned int flag; \
int j; \
for (flag=0, j=0; j<np; j++) \
if (lock_islocked((PT)->probe[j])) \
flag |= (unsigned int)1<<(np-1-j); \
PT->count[flag]++; \
} \
} \
MACRO_END
In another one of the files CC appears like this:
#define K2_MSTR_INTR_MODE_ACCEL 1 /* Accelerator Mode */
I suspect we need to be a little more selective about when the fix does
not apply. What a mess :(
> * traditional hacks like irix_bogus_cxx_cmnt, no longer work (which
> * strangely enough was also used on alpha-dec-osf4.0d). If we skip the
> * hack whenever we see ``"//"'', then the need for the secondary hack
> * disappears. Note: it is painful to ensure that the first quote
> * exists, so we just check for the trailing quote directly abutting
> * the //. Note: We should never touch a line that has // completely
Note the reference to osf4.0d. I wonder if it's related to the problem
we're seeing.
> BTW, what is your intent vis-a-vis
> "fixinc patch: eliminate need for setenv/putenv"?
I installed it last night.
I'm going to go ahead and install the fixes you sent today :-)
Note, we're also not fixing sys/limits.h, but I already know what the problem
is with that one and will fix it shortly.
jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: fast-fixinc losing badly on alpha-dec-osf4.0a
@ 1999-06-30 23:07 korbb
1999-06-03 22:32 ` Jeffrey A Law
0 siblings, 1 reply; 3+ messages in thread
From: korbb @ 1999-06-30 23:07 UTC (permalink / raw)
To: egcs-bugs, law; +Cc: ddsinc09
Reply-To: ddsinc09@ix.netcom.com
*PLEASE* if you press the "Reply" button, edit my address. Thanks.
Hi Jeff,
> fast-fixincludes is missing several fixes that were performed
> by the old fixincludes script on alpha-dec-osf4.0a.
>
> They fall into two basic categories.
>
> 1. Failure to fix the _IO macros in many files.
I will work on this today:
Applying No_Double_Slash to ./bktest/fix.h
Applying Io_Def_Quotes to ./bktest/fix.h
Fixed: ./bktest/fix.h
Io_Def_Quotes did not do anything :-(
> 2. Failure to turn C++ comments into a C comment.
Very odd. What is the name of the file? My fixincl program
stripped out the '//' comment from your sample.
The no_double_slash fix omits all files containing any of
CC/
cxx/
++/
in their names. Also, the fix is only applied if either:
1. the double slash does not appear to be part of a URL
2. is not followed by a double quote or an asterisk
/*
* Remove the double-slash comments
* They *must* be removed so it will not create nested comments!!
* However, they will *not* be removed if the file is from a C++ dir.
*
* There *used* to be a number of similar problems in various OSes:
* Turning // comments into normal comments trashes this IRIX 4.0.1
* header file, which embeds // comments inside multi-line
* comments. If this looks like the IRIX header file, we refix it by
* just throwing away the // comments.
* Same problem with a file from SunOS 4.1.3 : a header file containing
* the string "//" embedded in "/ * * /"
* There is a similar problem with the VxWorks drv/netif/if_med.h file.
* And also with the HP-UX 10 and HP-UX 11 sys/pci.h file
* Now that we delete the // comments instead of converting them to / * * /,
* traditional hacks like irix_bogus_cxx_cmnt, no longer work (which
* strangely enough was also used on alpha-dec-osf4.0d). If we skip the
* hack whenever we see ``"//"'', then the need for the secondary hack
* disappears. Note: it is painful to ensure that the first quote
* exists, so we just check for the trailing quote directly abutting
* the //. Note: We should never touch a line that has // completely
* within quotes but this is somewhat hard to check for.
* Ultimately, this fix ought to go inside of C code where
* we can do a better analysis on the need and method for fixing.
*/
fix = {
hackname = no_double_slash;
/*
* Test that the file-to-fix does not from a C++ directory
*/
test = '-z `echo ${file} | egrep \'(CC|cxx|\+\+)/\' `';
/*
* Select only files that contain a double slash that either:
* 1. starts a line
* 2. does not follow a colon (not part of a URL)
* 3. is not immediately followed by '"' or '*'
*/
select = '(^|[^:])//[^"*]';
/*
* Remove the comments that start a line
*/
sed = 's,^//.*$,,';
/*
* Remove the comments that are not quoted and not in a URL
*/
sed = 's,[^:]//[^"].*$,,';
};
==========================
BTW, what is your intent vis-a-vis
"fixinc patch: eliminate need for setenv/putenv"?
Thanks.
Bruce
^ permalink raw reply [flat|nested] 3+ messages in thread
* fast-fixinc losing badly on alpha-dec-osf4.0a
@ 1999-06-02 22:09 Jeffrey A Law
0 siblings, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 1999-06-02 22:09 UTC (permalink / raw)
To: ddsinc09; +Cc: egcs-bugs
fast-fixincludes is missing several fixes that were performed by the old
fixincludes script on alpha-dec-osf4.0a.
They fall into two basic categories.
1. Failure to fix the _IO macros in many files.
2. Failure to turn C++ comments into a C comment.
This was with the script version of fast-fixinc. Unfortunately, the files
are copyrighted by digital. I will include a a couple examples to show what
we are not properly handling. Hopefully they will be enough to find the
generic problem and fix all the occurences (there's at least a dozen files
which are not properly fixed).
In the first group we need to be quoting the 'a'. In the second group we
need to fix up the c++ comment in the first line.
/* ioctl commands */
#define IO_BIO _IOW(a,1,0) /* Block I/O commands */
#define IO_SYNC _IO(a,2) /* Synchronize host with AP */
#define IO_WR _IO(a,3) /* Synchronize AP Running with host */
#define IO_WD _IO(a,4) /* Synchronize AP DMA with host */
#define IO_FPSERR _IOR(a,5,short) /* return EFPS error information */
#define IO_RCSR _IOR(a,6,short) /* read CSR register */
#define IO_RFN _IOR(a,7,short) /* read FN register */
#define IO_SETMODE _IOW(a,8,short) /* sets low byte of drive mode word */
#define IO_GETMODE _IOR(a,9,short) /* gets driver mode word */
#define IO_RESET _IO(a,10) /* reset the AP */
//#define EBM10_MIN_SLOT 5 /* PCI_AD<16> */
/*#define EBM10_MIN_SLOT 7 */ /* PCI_AD<18> */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-06-30 23:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-30 23:07 fast-fixinc losing badly on alpha-dec-osf4.0a korbb
1999-06-03 22:32 ` Jeffrey A Law
-- strict thread matches above, loose matches on Subject: below --
1999-06-02 22:09 Jeffrey A Law
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).