public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/67304] New: Allow front-ends to share command-line options with different behaviours
@ 2015-08-21  9:12 ibuclaw at gdcproject dot org
  2015-08-21 11:13 ` [Bug other/67304] " joseph at codesourcery dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ibuclaw at gdcproject dot org @ 2015-08-21  9:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67304

            Bug ID: 67304
           Summary: Allow front-ends to share command-line options with
                    different behaviours
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ibuclaw at gdcproject dot org
  Target Milestone: ---

Marking as enhancement, as I'm sure that my situation is pretty unique (also
coming from a frontend maintained outside of gcc).

There are a couple of compiler-provided features in my frontend's frontend that
does the following for any provided source code to the compiler:
- Generate documentation.
- Generate 'header' sources.

Both come with independent options to set either the output file or directory.

Because they are 'generator' features, and do not have any effect on the
compilation process or codegen (unlike, for instance -fno-bounds-check), I'm a
bit wary of using an -fxxx option for them.

The upstream reference compiler uses the following options:

---
-D             generate documentation
-Dd<directory> write documentation file to directory
-Df<filename>  write documentation file to filename
-H             generate 'header' file
-Hd<directory> write 'header' file to directory
-Hf<filename>  write 'header' file to filename
---

Whilst it may seem natural to use the same options (also a win for existing
build tools), alas this is no good because C/C++ claims both -D and -H as
theirs and theirs only.  This seems overtly restricted.

For me, it makes more sense if the generated options.[ch] files had two levels
for handling front-end provided options.
1. To determine if the language handles -X
2. To forward -X to the language specific handler for processing/help/errors.

However I am not too familiar with the awk files used in the process, so I'm
not sure how much of an undertaking this will be.


N.B.  There's been a -J option in my frontend for some 12 years now, I'm not
sure if this precedes Fortran (long before my time when I picked up the
compiler), but Fortran claims it as theirs.  However I use it for something
completely different, and I guess it's only pure chance that we share identical
command-line usage. ;)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-21 14:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-21  9:12 [Bug other/67304] New: Allow front-ends to share command-line options with different behaviours ibuclaw at gdcproject dot org
2015-08-21 11:13 ` [Bug other/67304] " joseph at codesourcery dot com
2015-08-21 12:40 ` manu at gcc dot gnu.org
2015-08-21 14:18 ` ibuclaw at gdcproject dot org

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).