- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I am trying to refactor my code and for that I would like to compile with all the available warnings.If I compile with
F_OPTS= -FR -O0 -check -g -debug extended -debug-parameters -traceback -ftrapuv -u \ -fp-stack-check -assume byterecl -warn noerror -warn unused -warn uncalled -gen-interfaces
the compilation runs fine. If then I use -warn all , instead of getting warnings I get errors and the compilation stops. I have also tried to use -warn noerror but the result is the same, for example the following error disappears with the previous compiler options.
ifort -c -FR -check -g -debug extended -debug-parameters -traceback -u -fp-stack-check -assume byterecl \ -warn all -warn noerrors -gen-interfaces ed_xml_config.f90 ed_xml_config.f90(1274): error #6634: The shape matching rules of actual arguments and dummy arguments \ have been violated. [SFILIN] call putConfigSTRING("input_filepath",sfilin) -------------------------------------------^
Is there a way to only have warnings instead of errors?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The command line in the second example was cut off. My guess is that you have -warn interface enabled (possibly with -warn all or similar) - this will allow the compiler to check interfaces in the absence of an explicit interface. Your first example had -gen-interface but that by itself doesn't do any checking (and is obsolete.) I don't think that this particular diagnostic is a warning - it is always an error. But without -warn interface, the compiler might not be able to detect it.
I also suggest you remove -ftrapuv, as it does nothing useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve, as you anticipated it is indeed the warn interfaces (or warn all) that make the error appear (I guess the line is truncated).
I did not expect that this could be an error instead of a simple warning. Is there a way to continue compilation despite this error (I mean only to highlight all errors in code, not to really complete the compilation)?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can see if "-diag-disable=6634" allows this to be suppressed (I am not sure if it is), or you can build without -warn interface now that you know of the problem. Some errors can be disabled, but not all.
You should not ignore this error, though. It could lead to wrong results or data corruption. Check the code carefully and make sure that it is something you can safely ignore.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page