]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
common.opt (funsafe-loop-optimizations): Mark ignore.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
7c8f7eaa
DM
12016-07-20 David Malcolm <dmalcolm@redhat.com>
2
3 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4 spellcheck-tree.h
5 (best_macro_match): Likewise, converting from a typedef to a
6 subclass.
7 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
8 (lookup_name_fuzzy): Update for change of best_macro_match to a
9 subclass with a ctor that calls cpp_forall_identifiers.
10
de6a69ee
DM
112016-07-20 David Malcolm <dmalcolm@redhat.com>
12
13 * c-decl.c (implicit_decl_warning): Update for conversion of
14 return type of lookup_name_fuzzy to const char *.
15 (undeclared_variable): Likewise.
16 (lookup_name_fuzzy): Convert return type from tree to
17 const char *.
18 * c-parser.c (c_parser_declaration_or_fndef): Update for
19 conversion of return type of lookup_name_fuzzy to const char *.
20 (c_parser_parameter_declaration): Likewise.
21
b1c9c068
CP
222016-07-15 Cesar Philippidis <cesar@codesourcery.com>
23
24 * c-parser.c (c_parser_oacc_declare): Don't scan for
25 GOMP_MAP_POINTER.
26 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
27 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
28 zero-length subarrays.
29
ddbbcb19
JJ
302016-07-15 Jakub Jelinek <jakub@redhat.com>
31
32 PR c/71858
33 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
34 instead of FUZZY_LOOKUP_NAME.
35 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
36 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
37
dd36b877
JJ
382016-07-14 Jakub Jelinek <jakub@redhat.com>
39
40 PR c/71858
41 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
42
8c681247
TS
432016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
44
45 * c-parser.c (c_parser_generic_selection): Make type of variable
46 auto_vec.
47 (c_parser_omp_declare_simd): Likewise.
48
bf4fa671
TS
492016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
50
51 * c-decl.c (struct c_struct_parse_info): Change member types
52 from vec to auto_vec.
53 (start_struct): Adjust.
54 (finish_struct): Likewise.
55
557e8c49
JJ
562016-07-02 Jakub Jelinek <jakub@redhat.com>
57
58 PR c/71719
59 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
60
54d19c3b
TS
612016-06-29 Thomas Schwinge <thomas@codesourcery.com>
62
63 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
64 Move pragma context checking into...
65 (c_parser_omp_cancellation_point): ... here, and improve
66 diagnostic messages.
67 * c-typeck.c (c_finish_omp_cancel)
68 (c_finish_omp_cancellation_point): Improve diagnostic messages.
69
152ef731
JJ
702016-06-29 Jakub Jelinek <jakub@redhat.com>
71
72 PR c/71685
73 * c-typeck.c (c_build_qualified_type): Don't clear
74 C_TYPE_INCOMPLETE_VARS for the main variant.
75
762016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
77
78 PR c/71552
79 * c-typeck.c (output_init_element): Diagnose incompatible types
80 before non-constant initializers.
81
e9ac1f86
JJ
822016-06-28 Jakub Jelinek <jakub@redhat.com>
83
84 * Make-lang.in: Don't cat ../stage_current if it does not exist.
85
277d7ee0
AK
862016-06-23 Andi Kleen <ak@linux.intel.com>
87
88 * Make-lang.in: Add support for autofdo.
89
1a4f11c8
DM
902016-06-22 David Malcolm <dmalcolm@redhat.com>
91
92 PR c/70339
93 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
94 (implicit_decl_warning): When issuing warnings for implicit
95 declarations, attempt to provide a suggestion via
96 lookup_name_fuzzy.
97 (undeclared_variable): Likewise when issuing errors.
98 (lookup_name_in_scope): Likewise.
99 (struct edit_distance_traits<cpp_hashnode *>): New struct.
100 (best_macro_match): New typedef.
101 (find_closest_macro_cpp_cb): New function.
102 (lookup_name_fuzzy): New function.
103 * c-parser.c: Include gcc-rich-location.h.
104 (c_token_starts_typename): Split out case CPP_KEYWORD into...
105 (c_keyword_starts_typename): ...this new function.
106 (c_parser_declaration_or_fndef): When issuing errors about
107 missing "struct" etc, add a fixit. For other kinds of errors,
108 attempt to provide a suggestion via lookup_name_fuzzy.
109 (c_parser_parms_declarator): When looking ahead to detect typos in
110 type names, also reject CPP_KEYWORD.
111 (c_parser_parameter_declaration): When issuing errors about
112 unknown type names, attempt to provide a suggestion via
113 lookup_name_fuzzy.
114 * c-tree.h (c_keyword_starts_typename): New prototype.
115
5a578671
JM
1162016-06-20 Joseph Myers <joseph@codesourcery.com>
117
118 PR c/71601
119 * c-typeck.c (build_conditional_expr): Return error_mark_node if
120 c_common_type returns error_mark_node.
121
aa0db437
MS
1222016-06-19 Martin Sebor <msebor@redhat.com>
123
124 PR c/69507
125 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
126 __alignof__ (expression).
127
6a3f203c
DM
1282016-06-14 David Malcolm <dmalcolm@redhat.com>
129
130 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
131
264757fb
DM
1322016-06-14 David Malcolm <dmalcolm@redhat.com>
133
134 * c-typeck.c (build_component_ref): Simplify fixit code by
135 using gcc_rich_location::add_fixit_misspelled_id.
136 (set_init_label): Likewise.
137
f7e4f2e3
DM
1382016-06-13 David Malcolm <dmalcolm@redhat.com>
139
140 * c-parser.c (c_parser_initelt): Provide location of name for new
141 location_t param of set_init_label.
142 * c-tree.h (set_init_label): Add location_t param.
143 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
144 param and use it when issuing error messages about unrecognized
145 field names. Attempt to provide a fixit hint if appropriate,
146 otherwise update the error message to provide the type name.
147
4b1ffdb1
TS
1482016-06-10 Thomas Schwinge <thomas@codesourcery.com>
149
150 PR c/71381
151 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
152 Loosen checking.
153
44a845ca
MS
1542016-06-08 Martin Sebor <msebor@redhat.com>
155 Jakub Jelinek <jakub@redhat.com>
156
157 PR c++/70507
158 PR c/68120
159 * c-typeck.c (convert_arguments): Don't promote last argument
160 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
161
92a5f2ba
MP
1622016-06-08 Marek Polacek <polacek@redhat.com>
163
164 PR c/71418
165 * c-decl.c (grokdeclarator): Check TYPE_P.
166
08203f73
MP
167 PR c/71426
168 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
169 code.
170
6ffd47b7
DM
1712016-06-07 David Malcolm <dmalcolm@redhat.com>
172
173 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
174 and structure element reference, capture the location of the
175 element name token and pass it to build_component_ref.
176 (c_parser_postfix_expression_after_primary): Likewise for
177 structure element dereference.
178 (c_parser_omp_variable_list): Likewise for
179 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
180 * c-tree.h (build_component_ref): Add location_t param.
181 * c-typeck.c (build_component_ref): Add location_t param
182 COMPONENT_LOC. Use it, if available, when issuing hints about
183 mispelled member names to provide a fixit replacement hint.
184
1f40cff3
MP
1852016-06-06 Marek Polacek <polacek@redhat.com>
186
187 PR c/71362
188 * c-parser.c (c_parser_direct_declarator): Set location.
189
5545a907
MP
1902016-06-06 Marek Polacek <polacek@redhat.com>
191
192 * c-typeck.c (comptypes_internal): Handle comparisons of
193 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
194 TYPE_REF_CAN_ALIAS_ALL.
195
b605f663
CLT
1962016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
197
198 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
199 arguments as addressable when async clause exists.
200
00631022
JJ
2012016-05-30 Jakub Jelinek <jakub@redhat.com>
202
203 PR c++/71349
204 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
205 when combined with target construct.
206
7211a097
JJ
2072016-05-26 Jakub Jelinek <jakub@redhat.com>
208
209 * c-parser.c (c_parser_omp_clause_schedule): Warn if
210 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
211
95efe6b6
MP
2122016-05-25 Marek Polacek <polacek@redhat.com>
213
214 PR c/71265
215 * c-decl.c (c_make_fname_decl): Don't check seen_error.
216
a23faf7a
MP
217 PR c/71266
218 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
219
e46c7770
CP
2202016-05-24 Cesar Philippidis <cesar@codesourcery.com>
221
222 * c-parser.c (c_parser_oacc_declare): Add support for
223 GOMP_MAP_FIRSTPRIVATE_POINTER.
224 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
225 argument with enum c_omp_region_type ort.
226 (handle_omp_array_sections): Likewise. Update call to
227 handle_omp_array_sections_1.
228 (c_finish_omp_clauses): Add specific errors and warning messages for
229 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
230 call to handle_omp_array_sections.
231
a04e69c0
TS
2322016-05-24 Thomas Schwinge <thomas@codesourcery.com>
233
234 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
235
f17a223d
RB
2362016-05-24 Richard Biener <rguenther@suse.de>
237
238 PR middle-end/70434
239 PR c/69504
240 * c-typeck.c (build_array_ref): Do not complain about indexing
241 non-lvalue vectors. Adjust for function name change.
242
79063edd
MS
2432016-05-20 Martin Sebor <msebor@redhat.com>
244
245 PR c/71115
246 * c-typeck.c (error_init): Use
247 expansion_point_location_if_in_system_header.
248 (warning_init): Same.
249
8a40fef3
DM
2502016-05-19 David Malcolm <dmalcolm@redhat.com>
251
252 PR c/71171
253 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
254 in error-handling.
255 (c_parser_postfix_expression): Likewise.
256 * c-tree.h (c_expr::set_error): New method.
257 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
258 that result's range is initialized.
259
e9892350
JG
2602016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
261
262 * c-typeck.c (parser_build_unary_op): Fix formatting.
263
8fad45f5
MW
2642016-05-16 Matthew Wahab <matthew.wahab@arm.com>
265
266 * c-decl.c (grokdeclarator): Remove errmsg and use of
267 targetm.invalid_return_type.
268 (grokparms): Remove errmsg and use of
269 targetm.invalid_parameter_type.
270
aa4b467b
JM
2712016-05-13 Joseph Myers <joseph@codesourcery.com>
272
273 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
274 function return type.
275
4f2e1536
MP
2762016-05-12 Marek Polacek <polacek@redhat.com>
277
278 PR c/70756
279 * c-decl.c (build_compound_literal): Pass LOC down to
280 c_incomplete_type_error.
281 * c-tree.h (require_complete_type): Adjust declaration.
282 (c_incomplete_type_error): Likewise.
283 * c-typeck.c (require_complete_type): Add location parameter, pass it
284 down to c_incomplete_type_error.
285 (c_incomplete_type_error): Add location parameter, pass it down to
286 error_at.
287 (build_component_ref): Pass location down to c_incomplete_type_error.
288 (default_conversion): Pass location down to require_complete_type.
289 (build_array_ref): Likewise.
290 (build_function_call_vec): Likewise.
291 (convert_arguments): Likewise.
292 (build_unary_op): Likewise.
293 (build_c_cast): Likewise.
294 (build_modify_expr): Likewise.
295 (convert_for_assignment): Likewise.
296 (c_finish_omp_clauses): Likewise.
297
d6e83a8d
MM
2982016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
299
300 PR c/43651
301 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
302 is enabled.
303 * c-errors.c (pedwarn_c90): Return true if warned.
304 * c-tree.h (pedwarn_c90): Change return type to bool.
305 (enum c_declspec_word): Add new enumerator cdw_atomic.
306
5c3a10fb
MP
3072016-05-11 Marek Polacek <polacek@redhat.com>
308
309 PR c++/71024
310 * c-decl.c (diagnose_mismatched_decls): Factor out code to
311 diagnose_mismatched_attributes and call it.
312
cf68d92c
MP
3132016-05-10 Marek Polacek <polacek@redhat.com>
314
315 PR c/70255
316 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
317 on a declaration following the definition.
318
351f85c5
JJ
3192016-05-05 Jakub Jelinek <jakub@redhat.com>
320
321 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
322 parse it through to c_parser_c99_block_statement.
323 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
324 caller.
325
deef7113
MP
3262016-05-04 Marek Polacek <polacek@redhat.com>
327
328 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
329 OPT_Wdangling_else.
330
de55efd5
MP
3312016-05-04 Marek Polacek <polacek@redhat.com>
332
333 PR c/48778
334 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
335 for macro expansions.
336
79ce98bc
MP
3372016-05-03 Marek Polacek <polacek@redhat.com>
338
339 PR c/70859
340 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
341 check_builtin_function_arguments.
342
fb2647aa
RB
3432016-05-03 Richard Biener <rguenther@suse.de>
344
345 * Make-lang.in (cc1-checksum.c): For stage-final re-use
346 the checksum from the previous stage.
347
77886428
CP
3482016-05-02 Cesar Philippidis <cesar@codesourcery.com>
349
350 * c-parser.c (c_parser_oacc_all_clauses): Update call to
351 c_finish_omp_clauses.
352 (c_parser_omp_all_clauses): Likewise.
353 (c_parser_oacc_cache): Likewise.
354 (c_parser_oacc_loop): Likewise.
355 (omp_split_clauses): Likewise.
356 (c_parser_omp_declare_target): Likewise.
357 (c_parser_cilk_all_clauses): Likewise.
358 (c_parser_cilk_for): Likewise.
359 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
360 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
361
7176a4a0
MP
3622016-05-02 Marek Polacek <polacek@redhat.com>
363
364 PR c/70851
365 * c-decl.c (grokdeclarator): Diagnose when array's size has an
366 incomplete type.
367
e7ff0319
CP
3682016-04-29 Cesar Philippidis <cesar@codesourcery.com>
369
370 PR middle-end/70626
371 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
372 OACC_LOOP_CLAUSE_MASK.
373 (c_parser_oacc_kernels_parallel): Update call to
374 c_oacc_split_loop_clauses.
375
9f405ce1
AM
3762016-04-28 Andrew MacLeod <amacleod@redhat.com>
377
378 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
379 argument to build_modify_expr in two cases.
380
c1e1f433
BS
3812016-04-27 Bernd Schmidt <bschmidt@redhat.com>
382
383 * c-parser.c (c_parser_postfix_expression_after_primary): Call
384 warn_for_memset instead of warning directly here.
385
2448a956
MP
3862016-04-26 Marek Polacek <polacek@redhat.com>
387
388 PR c/67784
389 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
390 out of ...
391 (c_parser_for_statement): ... here.
392 (c_parser_if_statement): Use it.
393 (c_parser_switch_statement): Use it.
394 (c_parser_while_statement): Use it.
395
b02a5e26
MP
396 PR c/70791
397 * c-decl.c (pushdecl): Pass LOCUS down to warning.
398
477d4906
IV
3992016-04-20 Ilya Verbin <ilya.verbin@intel.com>
400
401 PR c++/69363
402 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
403 instead of c_finish_cilk_clauses.
404 * c-tree.h (c_finish_omp_clauses): Add new default argument.
405 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
406 floating-point variables in the linear clause for Cilk Plus.
407
fe37c7af
MM
4082016-04-18 Michael Matz <matz@suse.de>
409
410 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
411 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
412
949505a9
MP
4132016-04-15 Marek Polacek <polacek@redhat.com>
414
415 PR c/70671
416 * c-typeck.c (build_unary_op): Pass location down to error and
417 warning call.
418
dda1bf61
JJ
4192016-04-15 Jakub Jelinek <jakub@redhat.com>
420
421 PR c/70436
422 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
423 where needed.
424 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
425 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
426 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
427 Adjust c_parser_pragma callers.
428 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
429 caller.
430 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
431 c_parser_statement.
432 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
433 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
434 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
435 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
436 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
437 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
438 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
439 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
440 down where needed.
441 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
442 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
443 calls.
444
99cd9857
MP
4452016-04-13 Marek Polacek <polacek@redhat.com>
446
447 PR c/70436
448 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
449 adjust callers.
450 (c_parser_statement): Likewise.
451 (c_parser_c99_block_statement): Likewise.
452 (c_parser_while_statement): Likewise.
453 (c_parser_for_statement): Likewise.
454 (c_parser_if_body): Don't set IF_P here.
455 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
456 about dangling else here.
457 * c-tree.h (c_finish_if_stmt): Adjust declaration.
458 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
459 warn about dangling else here.
460
f13355da
MP
4612016-04-04 Marek Polacek <polacek@redhat.com>
462
463 PR c/70307
464 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
465
5fde6a45
MP
4662016-03-31 Marek Polacek <polacek@redhat.com>
467
468 PR c/70297
469 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
470
4bbf545b
DM
4712016-03-18 David Malcolm <dmalcolm@redhat.com>
472
473 PR c/70281
474 * c-parser.c (c_parser_postfix_expression): Set the source range
475 for uses of "__builtin_types_compatible_p".
476
fcc2b74f
JJ
4772016-03-17 Jakub Jelinek <jakub@redhat.com>
478
479 PR c/70280
480 * c-typeck.c (composite_type): Don't count void_list_node
481 into len, if the list is terminated by void_list_node, start
482 with void_list_node instead of NULL for newargs. Stop
483 at void_list_node.
484
ab4c578f
MP
4852016-03-16 Marek Polacek <polacek@redhat.com>
486
487 PR c/70093
488 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
489 nested functions returning VM types.
490
96b3c82d
CP
4912016-03-09 Cesar Philippidis <cesar@codesourcery.com>
492
493 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
494 when calling c_finish_omp_clauses.
495
29b9828f
BS
4962016-03-04 Bernd Schmidt <bschmidt@redhat.com>
497
498 PR c/69824
499 * c-decl.c (get_parm_info): Don't queue implicit function declarations
500 for later.
501
7ff6ca38
MP
5022016-03-04 Marek Polacek <polacek@redhat.com>
503
504 PR c/69798
505 * c-parser.c (c_parser_postfix_expression): Call
506 c_parser_cast_expression rather than c_parser_postfix_expression.
507
686e2237
JJ
5082016-03-01 Jakub Jelinek <jakub@redhat.com>
509
510 PR c/69796
511 PR c/69974
512 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
513 of incomplete decls to error_mark_node.
514
0b05329b
MP
5152016-02-24 Marek Polacek <polacek@redhat.com>
516
517 PR c/69819
518 * c-decl.c (finish_decl): Don't update the copy of the type of a
519 different decl type.
520
067fbd8b
JJ
5212016-02-23 Jakub Jelinek <jakub@redhat.com>
522
523 PR objc/69844
524 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
525 in id_kind reclassification.
526
bf14eba2
JJ
5272016-02-16 Jakub Jelinek <jakub@redhat.com>
528
529 PR c/69835
530 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
531
ba539195
JN
5322016-02-16 James Norris <jnorris@codesourcery.com>
533
534 PR c/64748
535 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
536
16595a1f
BS
5372016-02-12 Bernd Schmidt <bschmidt@redhat.com>
538
f48dfe98
BS
539 * c-decl.c (build_null_declspecs): Zero the entire struct.
540
16595a1f
BS
541 PR c/69522
542 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
543 callers changed. If nested_p is true, use it to call
544 finish_implicit_inits.
545 * c-tree.h (finish_implicit_inits): Declare.
546 * c-typeck.c (finish_implicit_inits): New function. Move code
547 from ...
548 (push_init_level): ... here.
549 (set_designator, process_init_element): Call finish_implicit_inits.
550
66756373
JJ
5512016-02-11 Jakub Jelinek <jakub@redhat.com>
552
553 PR c/69768
554 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
555 arguments for -Waddress warning.
556
1066e9b5
JJ
5572016-02-04 Jakub Jelinek <jakub@redhat.com>
558
559 PR c/69669
560 * c-decl.c (finish_enum): When honoring mode attribute,
561 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
562
3a5d2ba4
JJ
5632016-01-29 Jakub Jelinek <jakub@redhat.com>
564
565 PR debug/69518
566 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
567 all type variants, not just TYPE_MAIN_VARIANT.
568
cbdd8ae0
JJ
5692016-01-27 Jakub Jelinek <jakub@redhat.com>
570
571 PR debug/66869
572 * c-decl.c (c_write_global_declarations_1): Warn with
573 warn_unused_function if static prototype without definition
574 is not C_DECL_USED.
575
fa74a4bc
MP
5762016-01-27 Marek Polacek <polacek@redhat.com>
577
578 PR c/68062
579 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
580 to unsigned, if needed. Add -Wsign-compare warning.
581
13f92e8d
JJ
5822016-01-26 Jakub Jelinek <jakub@redhat.com>
583
584 PR tree-optimization/69483
585 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
586
cd8e73dc 5872016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
588
589 PR c/24293
590 * c-tree.h (incomplete_record_decls): Declare.
591 * c-parser.c (incomplete_record_decls): Define.
592 (c_parser_translation_unit): Iterate through incomplete_record_decls and
593 report error if any decl has zero size.
594 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
595 or enum type to incomplete_record_decls.
596
e6d6ec9e
TV
5972016-01-14 Tom de Vries <tom@codesourcery.com>
598
599 PR tree-optimization/68773
600 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
601 set force_output.
602
00083992
MP
6032016-01-14 Marek Polacek <polacek@redhat.com>
604
605 PR c/69262
606 * c-decl.c (grokdeclarator): Provide more information for invalid
607 array declarations.
608
7443cf13
DM
6092016-01-06 David Malcolm <dmalcolm@redhat.com>
610
611 * c-parser.c (c_parser_unary_expression): For dereferences, build
612 a combined location before calling build_indirect_ref, so that
613 error reports cover the full range, manually updating the c_expr
614 src_range.
615
6b131d5b
MP
6162016-01-06 Marek Polacek <polacek@redhat.com>
617
618 PR sanitizer/69099
619 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
620 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
621 NULL.
622
818ab71a
JJ
6232016-01-04 Jakub Jelinek <jakub@redhat.com>
624
625 Update copyright years.
626
2fe0a208
MP
6272016-01-04 Marek Polacek <polacek@redhat.com>
628
629 PR c/68908
630 * c-typeck.c (build_atomic_assign): Improve commentary. Add
631 optimization to use __atomic_fetch_* built-in if possible.
632
c7b48c8a
TS
6332015-12-23 Thomas Schwinge <thomas@codesourcery.com>
634
635 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
636 into...
637 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
638 all users.
639
fda5652f
MP
6402015-12-22 Marek Polacek <polacek@redhat.com>
641
642 PR c/69002
643 * c-typeck.c (build_component_ref): Warn when acessing elements of
644 atomic structures or unions.
645
745e411d
DM
6462015-12-21 David Malcolm <dmalcolm@redhat.com>
647
648 * c-typeck.c: Include "gcc-rich-location.h".
649 (build_binary_op): In the two places that call binary_op_error,
650 create a gcc_rich_location and populate it with the location of
651 the binary op and its two operands.
652
94c40e19
DM
6532015-12-16 David Malcolm <dmalcolm@redhat.com>
654
655 * c-parser.c (c_parser_statement_after_labels): When calling
656 c_finish_return, Use the return expression's location if it has
657 one, falling back to the location of the first token within it.
658 * c-typeck.c (c_finish_return): When issuing warnings about
659 the incorrect presence/absence of a return value, issue a note
660 showing the declaration of the function.
661
de67c4c3
DM
6622015-12-16 David Malcolm <dmalcolm@redhat.com>
663
664 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
665 to 4.
666 (c_parser_peek_nth_token): New function.
667 (c_parser_peek_conflict_marker): New function.
668 (c_parser_error): Detect conflict markers and report them as such.
669
a10704e1
DM
6702015-12-16 David Malcolm <dmalcolm@redhat.com>
671
672 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
673 to preserve range information for the primary expression
674 in the call to c_parser_postfix_expression_after_primary.
675
8062bca6
DM
6762015-12-16 David Malcolm <dmalcolm@redhat.com>
677
678 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
679 expression location, falling back on the first token location,
680 rather than always using the latter.
681
d06f8b75
MP
6822015-12-16 Marek Polacek <polacek@redhat.com>
683
684 PR c/64637
685 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
686 available.
687
2994fb91
MP
6882015-12-15 Marek Polacek <polacek@redhat.com>
689
690 PR c/68907
691 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
692 artificial decl.
693
a1b93f8d
DM
6942015-12-08 David Malcolm <dmalcolm@redhat.com>
695
696 * c-parser.c (c_parser_alignof_expression): Capture location of
697 closing parenthesis (if any), or of end of unary expression, and
698 use it to build a src_range for the expression.
699
46c6e1e2
DM
7002015-12-08 David Malcolm <dmalcolm@redhat.com>
701
702 PR c/68757
703 * c-parser.c (c_parser_get_builtin_args): Add
704 "out_close_paren_loc" param, and write back to it.
705 (c_parser_postfix_expression): Capture the closing
706 parenthesis location for RID_CHOOSE_EXPR,
707 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
708 RID_BUILTIN_SHUFFLE and use it to set the source range
709 for such expressions; within RID_BUILTIN_COMPLEX set
710 the underlying location.
711
66189108
MP
7122015-12-07 Marek Polacek <polacek@redhat.com>
713
714 PR c/68668
715 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
716 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
717
f187980b
EB
7182015-12-04 Eric Botcazou <ebotcazou@adacore.com>
719
720 * c-tree.h (c_build_va_arg): Adjust prototype.
721 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
722 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
723 parameter, adjust throughout and issue an error if EXPR is a component
724 with reverse storage order.
725
4250754e
JM
7262015-12-02 Jason Merrill <jason@redhat.com>
727
728 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
729 (c_fully_fold_internal, decl_constant_value_for_optimization):
730 Move from c-common.c.
731 * c-tree.h: Declare decl_constant_value_for_optimization.
732 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
733
e9e32ee6
JM
7342015-12-02 Joseph Myers <joseph@codesourcery.com>
735
736 PR c/68162
737 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
738 following link from declarator to next declarator. Track original
739 qualified type and pass it to c_build_qualified_type.
740 * c-typeck.c (c_build_qualified_type): Add arguments
741 orig_qual_type and orig_qual_indirect.
742
ff7a55bf
TS
7432015-12-02 Thomas Schwinge <thomas@codesourcery.com>
744
745 * c-parser.c (c_parser_omp_clause_name)
746 (c_parser_oacc_all_clauses): Alphabetical sorting.
747
657e4e47
JJ
7482015-12-02 Jakub Jelinek <jakub@redhat.com>
749
750 PR c/68533
751 * c-decl.c (get_parm_info): Use b->locus instead of input_location
752 for diagnostics.
753
37d5ad46
JB
7542015-12-01 Julian Brown <julian@codesourcery.com>
755 Cesar Philippidis <cesar@codesourcery.com>
756 James Norris <James_Norris@mentor.com>
757
758 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
759 (c_parser_oacc_clause_use_device): New function.
760 (c_parser_oacc_all_clauses): Add use_device support.
761 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
762 (c_parser_oacc_host_data): New function.
763 (c_parser_omp_construct): Add host_data support.
764 * c-tree.h (c_finish_oacc_host_data): Add prototype.
765 * c-typeck.c (c_finish_oacc_host_data): New function.
766 (c_finish_omp_clauses): Add use_device support.
767
a4850ce9
JH
7682015-11-29 Jan Hubicka <hubicka@ucw.cz>
769
770 PR c/67106
771 * c-decl.c: Set TYPE_PACKED in variants.
772
b58d3df2
ML
7732015-11-27 Martin Liska <mliska@suse.cz>
774
775 PR c++/68312
776 * c-array-notation.c (fix_builtin_array_notation_fn):
777 Use release_vec_vec instead of vec::release.
778 (build_array_notation_expr): Likewise.
779 (fix_conditional_array_notations_1): Likewise.
780 (fix_array_notation_expr): Likewise.
781 (fix_array_notation_call_expr): Likewise.
782
aec17bfe
JJ
7832015-11-27 Jakub Jelinek <jakub@redhat.com>
784
785 PR c/63326
786 * c-parser.c (c_parser_compound_statement_nostart): If
787 last_label is true, use pragma_stmt instead of pragma_compound
788 as second c_parser_pragma argument.
789 (c_parser_omp_ordered, c_parser_omp_target_update,
790 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
791 false as second argument to c_parser_skip_to_pragma_eol after
792 diagnosing standalone directives used in pragma_stmt context.
793
688c4de0
IV
7942015-11-24 Ilya Verbin <ilya.verbin@intel.com>
795
796 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
797 with "if (ENABLE_OFFLOADING)".
798
cbd03aee
DM
7992015-11-23 David Malcolm <dmalcolm@redhat.com>
800
801 PR objc/68438
802 * c-parser.c (c_parser_postfix_expression): Set up source ranges
803 for various Objective-C constructs: Class.name syntax,
804 @selector(), @protocol(), @encode(), and [] message syntax.
805
a87a86e1
DM
8062015-11-20 David Malcolm <dmalcolm@redhat.com>
807
808 PR 62314
809 * c-typeck.c (should_suggest_deref_p): New function.
810 (build_component_ref): Special-case POINTER_TYPE when
811 generating a "not a structure of union" error message, and
812 suggest a "->" rather than a ".", providing a fix-it hint.
813
8ece8dfb
DM
8142015-11-19 David Malcolm <dmalcolm@redhat.com>
815
816 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
817 candidate into a new function, find_closest_identifier.
818
433068cc
MP
8192015-11-19 Marek Polacek <polacek@redhat.com>
820
821 PR c/68412
822 * c-typeck.c (parser_build_binary_op): Properly handle
823 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
824
bef08b71
DM
8252015-11-17 David Malcolm <dmalcolm@redhat.com>
826
827 * c-parser.c (set_c_expr_source_range): Bulletproof both
828 overloaded implementations against NULL expr->value.
829 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
830 values.
831 (c_parser_unary_expression): Likewise when handling addresses of
832 labels.
833 (c_parser_postfix_expression): Likewise for statement expressions,
834 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
835 __builtin_va_arg, and for __builtin_offset_of.
836 (c_parser_postfix_expression_after_paren_type): Initialize expr's
837 src_range using the range of the braced initializer.
838 (c_parser_transaction_expression): Set src_range for "ret" to a
839 sane pair of values.
840
fff77217
KY
8412015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
842
843 * c-parser.c (c_finish_omp_declare_simd): Look for
844 "simd" attribute as well. Update error message.
845
1d899da2
TS
8462015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
847
848 * c-parser.c (c_parser_omp_declare_target): Adjust.
849
e4606348
JJ
8502015-11-14 Jakub Jelinek <jakub@redhat.com>
851
852 * c-typeck.c (c_finish_omp_clauses): Don't mark
853 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
854
3e636daf
MP
8552015-11-14 Marek Polacek <polacek@redhat.com>
856
857 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
858 * c-typeck.c: Likewise.
859
ebedc9a3
DM
8602015-11-13 David Malcolm <dmalcolm@redhat.com>
861
862 * c-decl.c (warn_defaults_to): Pass line_table to
863 rich_location ctor.
864 * c-errors.c (pedwarn_c99): Likewise.
865 (pedwarn_c90): Likewise.
866 * c-parser.c (set_c_expr_source_range): New functions.
867 (c_token::get_range): New method.
868 (c_token::get_finish): New method.
869 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
870 based on the range from the start of the LHS to the end of the
871 RHS.
872 (c_parser_conditional_expression): Likewise, based on the range
873 from the start of the cond.value to the end of exp2.value.
874 (c_parser_binary_expression): Call set_c_expr_source_range on
875 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
876 (c_parser_cast_expression): Call set_c_expr_source_range on ret
877 based on the cast_loc through to the end of the expr.
878 (c_parser_unary_expression): Likewise, based on the
879 op_loc through to the end of op.
880 (c_parser_sizeof_expression) Likewise, based on the start of the
881 sizeof token through to either the closing paren or the end of
882 expr.
883 (c_parser_postfix_expression): Likewise, using the token range,
884 or from the open paren through to the close paren for
885 parenthesized expressions.
886 (c_parser_postfix_expression_after_primary): Likewise, for
887 various kinds of expression.
888 * c-tree.h (struct c_expr): Add field "src_range".
889 (c_expr::get_start): New method.
890 (c_expr::get_finish): New method.
891 (set_c_expr_source_range): New decls.
892 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
893 on ret for prefix unary ops.
894 (parser_build_binary_op): Likewise, running from the start of
895 arg1.value through to the end of arg2.value.
896
ec8b536f
MP
8972015-11-13 Marek Polacek <polacek@redhat.com>
898
899 PR c/68320
900 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
901
277fe616
DM
9022015-11-13 David Malcolm <dmalcolm@redhat.com>
903
904 * c-typeck.c: Include spellcheck.h.
905 (lookup_field_fuzzy_find_candidates): New function.
906 (lookup_field_fuzzy): New function.
907 (build_component_ref): If the field was not found, try using
908 lookup_field_fuzzy and potentially offer a suggestion.
909
6e232ba4
JN
9102015-11-12 James Norris <jnorris@codesourcery.com>
911 Joseph Myers <joseph@codesourcery.com>
912
913 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
914 (c_parser_omp_clause_name): Handle 'device_resident' clause.
915 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
916 and PRAGMA_OMP_CLAUSE_LINK.
917 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
918 and PRAGMA_OACC_CLAUSE_LINK.
919 (OACC_DECLARE_CLAUSE_MASK): New definition.
920 (c_parser_oacc_declare): New function.
921
9be4f715
MP
9222015-11-12 Marek Polacek <polacek@redhat.com>
923
924 PR c/67784
925 * c-parser.c (c_parser_for_statement): Reclassify the token in
926 a correct scope.
927
e78bede6
MP
9282015-11-11 Marek Polacek <polacek@redhat.com>
929
930 PR c/68107
931 PR c++/68266
932 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
933 checking the size of an array.
934
69f293c9
AM
9352015-11-11 Andrew MacLeod <amacleod@redhat.com>
936
937 * c-array-notation.c: Remove unused header files.
938 * c-aux-info.c: Likewise.
939 * c-convert.c: Likewise.
940 * c-decl.c: Likewise.
941 * c-errors.c: Likewise.
942 * c-lang.c: Likewise.
943 * c-objc-common.c: Likewise.
944 * c-parser.c: Likewise.
945 * c-typeck.c: Likewise.
946 * gccspec.c: Likewise.
947
3a40d81d
NS
9482015-11-09 Thomas Schwinge <thomas@codesourcery.com>
949 Cesar Philippidis <cesar@codesourcery.com>
950 James Norris <jnorris@codesourcery.com>
951 Julian Brown <julian@codesourcery.com>
952 Nathan Sidwell <nathan@codesourcery.com>
953
954 c/
955 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
956 routine arg.
957 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
958 (c_parser_pragma): Parse 'acc routine'.
959 (OACC_ROUTINE_CLAUSE_MARK): Define.
960 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
961
fc402eec
AA
9622015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
963
964 PR debug/67192
965 * c-typeck.c (c_finish_loop): For unconditional loops, set the
966 location of the backward-goto to the start of the loop body.
967
f6b0b3db
AA
9682015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
969
970 PR debug/67192
971 * c-parser.c (c_parser_while_statement): Finish the loop before
972 parsing ahead for misleading indentation.
973 (c_parser_for_statement): Likewise.
974
ee45a32d
EB
9752015-11-08 Eric Botcazou <ebotcazou@adacore.com>
976
977 * c-decl.c (finish_struct): If the structure has reverse storage
978 order, rewrite the type of array fields with scalar component. Call
979 maybe_apply_pragma_scalar_storage_order on entry.
980 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
981 errors on bit-fields and reverse SSO here and not...
982 (c_mark_addressable): ...here.
983 (output_init_element): Adjust call to initializer_constant_valid_p.
984 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
985
8a645150
DM
9862015-11-06 David Malcolm <dmalcolm@redhat.com>
987
988 * c-decl.c (warn_defaults_to): Update for change in signature
989 of diagnostic_set_info.
990 * c-errors.c (pedwarn_c99): Likewise.
991 (pedwarn_c90): Likewise.
992 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
993 for textinfo::set_location.
994
7a5e4956
CP
9952015-11-05 Cesar Philippidis <cesar@codesourcery.com>
996 Thomas Schwinge <thomas@codesourcery.com>
997 James Norris <jnorris@codesourcery.com>
998
999 * c-parser.c (c_parser_omp_clause_name): Add support for
1000 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1001 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1002 default(none) in OpenACC.
1003 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1004 arguments.
1005 (c_parser_oacc_clause_tile): New function.
1006 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1007 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1008 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1009 TILE}.
1010 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1011 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1012 FIRSTPRIVATE}.
1013 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1014 (c_parser_oacc_update): Update the error message for missing clauses.
1015 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1016 and OMP_CLAUSE_INDEPENDENT.
1017
bfcfbfa0
MP
10182015-11-05 Marek Polacek <polacek@redhat.com>
1019
1020 PR c/68090
1021 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1022 deal with pre-evaluation on invalid types.
1023
e01d41e5
JJ
10242015-11-05 Jakub Jelinek <jakub@redhat.com>
1025 Ilya Verbin <ilya.verbin@intel.com>
1026
1027 * c-parser.c: Include context.h and gimple-expr.h.
1028 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1029 monotonic together with nonmonotonic.
1030 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1031 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1032 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1033 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1034 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1035 expressions on combined target teams before the target.
1036 (c_parser_omp_declare_target): If decl has "omp declare target" or
1037 "omp declare target link" attribute, and cgraph or varpool node already
1038 exists, then set corresponding flags. Call c_finish_omp_clauses
1039 in the parenthesized extended-list syntax case.
1040 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1041 declare target.
1042 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1043 on OMP_CLAUSE_REDUCTION array sections.
1044 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1045 into the constant offset, or for variable low-bound using
1046 POINTER_PLUS_EXPR. For structure element based array sections use
1047 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1048 (c_finish_omp_clauses): Drop generic_field_head, structure
1049 elements are now always mapped even as array section bases,
1050 diagnose same var in data sharing and mapping clauses. Diagnose if
1051 linear step on declare simd is neither a constant nor a uniform
1052 parameter. Look through POINTER_PLUS_EXPR for array section
1053 reductions. Diagnose the same var or function appearing multiple
1054 times on the same directive. Fix up wording for the to clause if t
1055 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1056 modifier on kinds other than dynamic or guided or nonmonotonic
1057 modifier together with ordered clause.
1058
4bf9e5a8
TS
10592015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1060 Chung-Lin Tang <cltang@codesourcery.com>
1061
1062 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1063
2adfab87
AM
10642015-10-29 Andrew MacLeod <amacleod@redhat.com>
1065
1066 * c-array-notation.c: Reorder #include's and remove duplicates.
1067 * c-aux-info.c: Likewise.
1068 * c-convert.c: Likewise.
1069 * c-decl.c: Likewise.
1070 * c-errors.c: Likewise.
1071 * c-lang.c: Likewise.
1072 * c-objc-common.c: Likewise.
1073 * c-parser.c: Likewise.
1074 * c-typeck.c: Likewise.
1075
e922069e
JW
10762015-10-26 Jim Wilson <jim.wilson@linaro.org>
1077
1078 PR debug/66068
1079 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1080 after calling build_qualified_type.
1081
765dd391
CP
10822015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1083 Thomas Schwinge <thomas@codesourcery.com>
1084 James Norris <jnorris@codesourcery.com>
1085 Joseph Myers <joseph@codesourcery.com>
1086 Julian Brown <julian@codesourcery.com>
1087 Bernd Schmidt <bschmidt@redhat.com>
1088
1089 * c-parser.c (c_parser_oacc_shape_clause): New.
1090 (c_parser_oacc_simple_clause): New.
1091 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1092 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1093
88bae6f4
TS
10942015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1095 James Norris <jnorris@codesourcery.com>
1096 Cesar Philippidis <cesar@codesourcery.com>
1097
1098 PR c/64765
1099 PR c/64880
1100 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1101 parameters, and handle these. Adjust all users.
1102 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1103 into...
1104 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1105 all users.
1106 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1107 declare functions.
1108 (c_finish_omp_construct): Declare function.
1109 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1110 Merge functions into...
1111 (c_finish_omp_construct): ... this new function.
1112
a8fc2579
RB
11132015-10-22 Richard Biener <rguenther@suse.de>
1114
1115 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1116 before folding a MINUS_EXPR.
1117
e9122ef6
MP
11182015-10-21 Marek Polacek <polacek@redhat.com>
1119
1120 PR c/68024
1121 * c-decl.c (start_function): Warn about vararg functions without
1122 a prototype.
1123
9f47c7e5
IE
11242015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1125
1126 * c-typeck.c (build_conditional_expr): Use boolean vector
1127 type for vector comparison.
1128 (build_vec_cmp): New.
1129 (build_binary_op): Use build_vec_cmp for comparison.
1130
fa60eeb9
MP
11312015-10-20 Marek Polacek <polacek@redhat.com>
1132
1133 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1134
2c7020eb
MP
11352015-10-20 Marek Polacek <polacek@redhat.com>
1136
1137 PR c/67964
1138 * c-parser.c (c_parser_attributes): Break out of the loop if the
1139 token after an attribute isn't a comma.
1140
d9a6bd32
JJ
11412015-10-13 Jakub Jelinek <jakub@redhat.com>
1142 Aldy Hernandez <aldyh@redhat.com>
1143
1144 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1145 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1146 (c_parser_omp_variable_list): Handle structure elements for
1147 map, to and from clauses. Handle array sections in reduction
1148 clause. Formatting fixes.
1149 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1150 if clause modifiers.
1151 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1152 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1153 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1154 c_parser_omp_clause_is_device_ptr): New functions.
1155 (c_parser_omp_clause_ordered): Parse optional parameter.
1156 (c_parser_omp_clause_reduction): Handle array reductions.
1157 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1158 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1159 functions.
1160 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1161 (c_parser_omp_clause_depend_sink): New function.
1162 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1163 (c_parser_omp_clause_map): Parse release/delete map kinds and
1164 optional always modifier.
1165 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1166 and c_finish_omp_clauses callers.
1167 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1168 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1169 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1170 (OMP_CRITICAL_CLAUSE_MASK): Define.
1171 (c_parser_omp_critical): Parse critical clauses.
1172 (c_parser_omp_for_loop): Handle doacross loops, adjust
1173 c_finish_omp_for and c_finish_omp_clauses callers.
1174 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1175 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1176 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1177 (c_parser_omp_for): Disallow ordered clause when combined with
1178 distribute. Disallow linear clause when combined with distribute
1179 and not combined with simd.
1180 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1181 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1182 parse clauses and if depend clause is found, don't parse a body.
1183 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1184 Allow target parallel without for after it.
1185 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1186 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1187 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1188 invalid kinds.
1189 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1190 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1191 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1192 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1193 functions.
1194 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1195 defaultmap and is_device_ptr clauses.
1196 (c_parser_omp_target): Parse target parallel and target simd. Set
1197 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1198 and target exit data. Diagnose invalid map kinds.
1199 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1200 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1201 construct.
1202 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1203 &omp_priv.
1204 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1205 (c_parser_omp_taskloop): New function.
1206 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1207 handle PRAGMA_OMP_TASKLOOP.
1208 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1209 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1210 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1211 Add IS_OMP argument, handle structure element bases, diagnose
1212 bitfields, pass IS_OMP recursively, diagnose known zero length
1213 array sections in depend clauses, handle array sections in reduction
1214 clause, diagnose negative length even for pointers.
1215 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1216 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1217 array sections in reduction clause, set
1218 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1219 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1220 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1221 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1222
21ba0cea
MP
12232015-10-06 Marek Polacek <polacek@redhat.com>
1224
1225 * c-parser.c (c_parser_statement_after_labels): Use
1226 protected_set_expr_location.
1227 (c_parser_omp_clause_num_gangs): Likewise.
1228 (c_parser_omp_clause_num_threads): Likewise.
1229 (c_parser_omp_clause_num_workers): Likewise.
1230 (c_parser_omp_clause_vector_length): Likewise.
1231 (c_parser_omp_clause_num_teams): Likewise.
1232 (c_parser_omp_clause_thread_limit): Likewise.
1233 * c-typeck.c (build_c_cast): Likewise.
1234 (c_cast_expr): Likewise.
1235
624d31fe
RS
12362015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1237
1238 * c-typeck.c (c_tree_equal): Use real_equal instead of
1239 REAL_VALUES_EQUAL.
1240
b8fd7909
JM
12412015-10-04 Jason Merrill <jason@redhat.com>
1242
1243 * c-parser.c (c_lex_one_token): Handle @synchronized.
1244 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1245 can change whether the function is transaction_safe.
1246
1c7485af
MP
12472015-10-02 Marek Polacek <polacek@redhat.com>
1248
1249 PR c/67730
1250 * c-typeck.c (convert_for_assignment): Use the expansion point
1251 location throughout.
1252
3e3b8d63
MP
12532015-10-02 Marek Polacek <polacek@redhat.com>
1254
1255 PR c/64249
1256 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1257 and pass it down to c_parser_if_statement.
1258 (c_parser_else_body): Add CHAIN parameter and pass it down to
1259 c_parser_statement_after_labels.
1260 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1261 duplicated if-else-if conditions.
1262
aabef2de
MP
12632015-10-01 Marek Polacek <polacek@redhat.com>
1264
1265 * c-typeck.c (convert_for_assignment): Improve commentary.
1266
de8ddd5f
MP
12672015-09-30 Marek Polacek <polacek@redhat.com>
1268
1269 PR c/67730
1270 * c-typeck.c (c_finish_return): Use the expansion point location for
1271 certain "return with value" warnings.
1272
c4914de6
MLI
12732015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1274
1275 * c-parser.c (pragma_lex): Add loc argument.
1276
0e36f5c7
MP
12772015-09-15 Marek Polacek <polacek@redhat.com>
1278
1279 PR c/67580
1280 * c-decl.c (tag_exists_p): New function.
1281 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1282 struct/union/enum keywords are missing.
1283 * c-tree.h (tag_exists_p): Declare.
1284
2f3bb934
MP
12852015-09-15 Marek Polacek <polacek@redhat.com>
1286
1287 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1288 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1289 Return NULL_TREE instead of 0.
1290 (lookup_name): Return NULL_TREE instead of 0.
1291 (lookup_name_in_scope): Likewise.
1292 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1293 (parser_xref_tag): Use false instead of 0.
1294 (start_struct): Use true instead of 1.
1295 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1296
aa256c4a
MP
12972015-09-14 Marek Polacek <polacek@redhat.com>
1298
1299 * c-typeck.c (set_nonincremental_init_from_string): Use
1300 HOST_WIDE_INT_M1U when shifting a negative value.
1301
dbb68221
MW
13022015-09-09 Mark Wielaard <mjw@redhat.com>
1303
1304 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1305 parm against NULL.
1306
a8a098ac
JJ
13072015-09-10 Jakub Jelinek <jakub@redhat.com>
1308
1309 PR c/67502
1310 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1311 into OMP_FOR_PRE_BODY rather than before the loop.
1312
f4b189d5
JJ
13132015-09-09 Jakub Jelinek <jakub@redhat.com>
1314
0bb99c11
JJ
1315 PR c/67501
1316 * c-parser.c (c_parser_oacc_all_clauses,
1317 c_parser_omp_all_clauses): Remove invalid clause from
1318 list of clauses even if parser->error is set.
1319
fce5e5e3
JJ
1320 PR c/67500
1321 * c-parser.c (c_parser_omp_clause_aligned,
1322 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1323 test for errors.
1324 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1325 error_mark_node.
1326
f4b189d5
JJ
1327 PR c/67495
1328 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1329 instead of c_parser_unary_expression. If the result is !lvalue_p,
1330 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1331
b2aaf235
MP
13322015-09-04 Marek Polacek <polacek@redhat.com>
1333
1334 PR sanitizer/67279
1335 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1336
1807ffc1
MS
13372015-09-03 Martin Sebor <msebor@redhat.com>
1338
1339 PR c/66516
8b652e65
JJ
1340 * c-typeck.c (convert_arguments, parser_build_unary_op,
1341 build_conditional_expr, c_cast_expr, convert_for_assignment,
1342 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1343 reject_gcc_builtin.
1344 (c_decl_implicit): Define.
1345
d04ff417
MP
13462015-09-02 Marek Polacek <polacek@redhat.com>
1347
1348 PR c/67432
1349 * c-parser.c (c_parser_enum_specifier): Give a better error for
1350 an empty enum.
1351
a79683d5
TS
13522015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1353
1354 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1355
191a6b94
MP
13562015-08-12 Marek Polacek <polacek@redhat.com>
1357
1358 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1359 LOC to it.
1360
420a9d9b
MP
13612015-08-03 Marek Polacek <polacek@redhat.com>
1362
1363 PR c/67088
1364 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1365 Use it.
1366 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1367
992118a1
PP
13682015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1369
1370 * c-parser.c (c_parser_if_body): Take token_indent_info
1371 argument. Call warn_for_misleading_indentation even when the
1372 body is a semicolon. Extract token_indent_infos corresponding
1373 to the guard, body and next tokens. Adjust call to
1374 warn_for_misleading_indentation accordingly.
1375 (c_parser_else_body): Likewise.
1376 (c_parser_if_statement): Likewise.
1377 (c_parser_while_statement): Likewise.
1378 (c_parser_for_statement): Likewise.
1379
46308474
LFSM
13802015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1381 Manuel López-Ibáñez <manu@gcc.gnu.org>
1382
1383 * c-decl.c (get_parm_info): Remove static var. Update warning
1384 message.
1385
05b28fd6
MP
13862015-07-27 Marek Polacek <polacek@redhat.com>
1387
1388 PR c++/66555
1389 PR c/54979
1390 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1391
451b5e48
MP
13922015-07-20 Marek Polacek <polacek@redhat.com>
1393
1394 PR c++/55095
1395 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1396 (build_binary_op): Warn about left shift overflows.
1397
1916bcb5
AM
13982015-07-09 Andrew MacLeod <amacleod@redhat.com>
1399
1400 * c-array-notation.c: Adjust includes for flags.h changes.
1401 * c-objc-common.c: Likewise.
1402
c7131fb2
AM
14032015-07-07 Andrew MacLeod <amacleod@redhat.com>
1404
1405 * c-array-notation.c: Adjust includes.
1406 * c-aux-info.c: Likewise.
1407 * c-convert.c: Likewise.
1408 * c-decl.c: Likewise.
1409 * c-errors.c: Likewise.
1410 * c-lang.c: Likewise.
1411 * c-objc-common.c: Likewise.
1412 * c-parser.c: Likewise.
1413 * c-typeck.c: Likewise.
1414
da2e71c9
MLI
14152015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1416
1417 PR fortran/66605
1418 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1419
b155cfd9
MP
14202015-06-29 Marek Polacek <polacek@redhat.com>
1421
1422 PR c/66322
1423 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1424 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1425 about -Wswitch-bool here.
1426 (do_case): Update c_add_case_label call.
1427 (c_finish_case): Update c_do_switch_warnings call.
1428
31521951
MP
14292015-06-27 Marek Polacek <polacek@redhat.com>
1430
1431 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1432
22d03525
MP
14332015-06-26 Marek Polacek <polacek@redhat.com>
1434
1435 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1436 INDIRECT_REF_P.
1437 * c-typeck.c (array_to_pointer_conversion): Likewise.
1438 (build_unary_op): Likewise.
1439 (c_finish_return): Likewise.
1440
f0889939
AM
14412015-06-25 Andrew MacLeod <amacleod@redhat.com>
1442
1443 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1444 * c-parser.c: Likewise.
1445
8d67ee55
RS
14462015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1447
1448 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1449 instead of pointer_hash.
1450 (detect_field_duplicates): Likewise.
1451
0ae9bd27
MP
14522015-06-25 Marek Polacek <polacek@redhat.com>
1453
1454 * c-array-notation.c: Use VAR_P throughout.
1455 * c-decl.c: Likewise.
1456 * c-objc-common.c: Likewise.
1457 * c-parser.c: Likewise.
1458 * c-typeck.c: Likewise.
1459
62f9079a
MP
14602015-06-25 Marek Polacek <polacek@redhat.com>
1461
1462 * c-decl.c: Use is_global_var throughout.
1463 * c-parser.c: Likewise.
1464 * c-typeck.c: Likewise.
1465
abb226c9
AM
14662015-06-17 Andrew MacLeod <amacleod@redhat.com>
1467
1468 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1469 * c-aux-info.c: Likewise.
1470 * c-convert.c: Likewise.
1471 * c-decl.c: Likewise.
1472 * c-errors.c: Likewise.
1473 * c-lang.c: Likewise.
1474 * c-objc-common.c: Likewise.
1475 * c-parser.c: Likewise.
1476 * c-typeck.c: Likewise.
1477
8cbababc
JH
14782015-06-11 Jan Hubicka <hubicka@ucw.cz>
1479
1480 PR middle-end/66325
1481 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1482 variants.
1483
a0349665
PMR
14842015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1485
1486 * c-decl.c (pop_scope): Register the main translation unit
1487 through the new debug hook.
1488
13fdf2e2
AM
14892015-06-08 Andrew MacLeod <amacleod@redhat.com>
1490
1491 * c-array-notation.c : Adjust include files.
1492 * c-aux-info.c : Likewise.
1493 * c-convert.c : Likewise.
1494 * c-decl.c : Likewise.
1495 * c-errors.c : Likewise.
1496 * c-lang.c : Likewise.
1497 * c-lang.h : Likewise.
1498 * c-objc-common.c : Likewise.
1499 * c-parser.c : Likewise.
1500 * c-typeck.c : Likewise.
1501
d7438551
AH
15022015-06-05 Aldy Hernandez <aldyh@redhat.com>
1503
1504 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1505 immediately clobber it.
1506 (c_write_global_declarations_1): Remove call to
1507 check_global_declaration_1.
1508 (c_write_global_declarations_2): Remove.
1509 (c_write_final_cleanups): Rename from c_write_global_declarations.
1510 Remove call to finalize_compilation_unit.
1511 Remove calls to debugging hooks.
1512 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1513 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1514 * c-tree.h: Remove c_write_global_declarations.
1515
ecb9f223
AM
15162015-06-04 Andrew MacLeod <amacleod@redhat.com>
1517
1518 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1519 * c-aux-info.c: Likewise.
1520 * c-convert.c: Likewise.
1521 * c-decl.c: Likewise.
1522 * c-errors.c: Likewise.
1523 * c-lang.c: Likewise.
1524 * c-objc-common.c: Likewise.
1525 * c-parser.c: Likewise.
1526 * c-typeck.c: Likewise.
1527
9482b620
MP
15282015-06-04 Marek Polacek <polacek@redhat.com>
1529
1530 PR c/66341
1531 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1532 it is a lvalue.
1533
bc51ace3
PK
15342015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1535
1536 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1537 Warn for empty struct.
1538 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1539
ea5b45b6
AT
15402015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1541
1542 * c-decl.c (start_function): Call plugin before parsing.
1543 (finish_function): Call plugin after parsing.
1544
c2d47482
PK
15452015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1546
1547 PR c/49551
1548 * c-decl.c (merge_decls): Merge DECL_COMMON.
1549
a95492ab
JW
15502015-05-22 Jim Wilson <jim.wilson@linaro.org>
1551
1552 * Make-lang.in (check_gcc_pallelize): Define.
1553
fd5c817a
MP
15542015-05-22 Marek Polacek <polacek@redhat.com>
1555
1556 PR c/47043
1557 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1558 attributes.
1559
c7b70a3c
MP
15602015-05-21 Marek Polacek <polacek@redhat.com>
1561
1562 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1563 DECL_BUILT_IN.
1564
21b634ae
MP
15652015-05-20 Marek Polacek <polacek@redhat.com>
1566
1567 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1568 * c-typeck.c: Likewise.
1569
296a8c2f
MP
15702015-05-19 Marek Polacek <polacek@redhat.com>
1571
1572 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1573
41b37d5e
JJ
15742015-05-19 Jakub Jelinek <jakub@redhat.com>
1575
1576 PR middle-end/66199
1577 * c-parser.c (c_parser_omp_for_loop): Don't add
1578 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1579 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1580 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1581 constructs.
1582
fab27f52
MM
15832015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1584
1585 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1586 swaps.
fab27f52 1587
40de31cf
MLI
15882015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1589
1590 PR fortran/44054
1591 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1592 accessor function.
1593
3aa3c9fc
MP
15942015-05-14 Marek Polacek <polacek@redhat.com>
1595
1596 PR c/66066
1597 PR c/66127
1598 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1599 rather than with 0.
1600
c3388e62
DM
16012015-05-12 David Malcolm <dmalcolm@redhat.com>
1602
1603 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1604 to add a call to warn_for_misleading_indentation.
1605 (c_parser_else_body): Likewise, adding param "else_loc".
1606 (c_parser_if_statement): Check for misleading indentation.
1607 (c_parser_while_statement): Likewise.
1608 (c_parser_for_statement): Likewise.
1609
755e528f
MP
16102015-05-08 Marek Polacek <polacek@redhat.com>
1611
1612 PR c/64918
1613 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1614 (output_init_element): Likewise.
1615
0173bd2a
MP
16162015-05-07 Marek Polacek <polacek@redhat.com>
1617
1618 PR c/65179
1619 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1620 value.
1621
9babc352
MP
16222015-04-30 Marek Polacek <polacek@redhat.com>
1623
1624 * c-typeck.c (set_init_label): Call error_at instead of error and
1625 pass LOC to it.
1626
ac9f18db
MP
1627 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1628 the type of a decl.
1629
ec3fba51
MP
1630 * c-typeck.c (c_build_va_arg): Clarify the error message.
1631
b811915d
TS
16322015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1633
1634 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1635 OMP_STANDALONE_CLAUSES.
1636
f3075008
MP
16372015-04-28 Marek Polacek <polacek@redhat.com>
1638
1639 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1640
4e81b788
MP
16412015-04-28 Marek Polacek <polacek@redhat.com>
1642
1643 PR c/65901
1644 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1645
6c1db78e
MP
16462015-04-25 Marek Polacek <polacek@redhat.com>
1647
1648 PR c/52085
1649 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1650 attribute.
1651
5c4abbb8
MP
16522015-04-23 Marek Polacek <polacek@redhat.com>
1653
1654 PR c/65345
1655 * c-decl.c (set_labels_context_r): New function.
1656 (store_parm_decls): Call it via walk_tree_without_duplicates.
1657 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1658 instead of create_tmp_var. Build TARGET_EXPR instead of
1659 COMPOUND_EXPR.
1660 (build_atomic_assign): Use create_tmp_var_raw instead of
1661 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1662
06aca1d5
IV
16632015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1664
1665 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1666 (c_parser_omp_target_update): Add missed %> to error_at ().
1667
8fba1830
BRF
16682015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1669
1670 PR target/55143
1671 * c-decl.c (c_default_pointer_mode): Remove definition.
1672 * c-tree.h (c_default_pointer_mode): Remove declaration.
1673
62021f64
TB
16742015-03-27 Tobias Burnus <burnus@net-b.de>
1675
1676 PR c/65586
1677 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1678 error out.
1679 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1680 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1681 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1682
9b65e171
JJ
16832015-03-19 Jakub Jelinek <jakub@redhat.com>
1684
1685 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1686 attribute for DECL_EXTERNAL VAR_DECLs.
1687
17958621
JJ
16882015-03-11 Jakub Jelinek <jakub@redhat.com>
1689
1690 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1691 argument.
1692
7ccb1a11
JJ
16932015-03-10 Jakub Jelinek <jakub@redhat.com>
1694
1695 PR c/65120
1696 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1697 before preparing arguments to warn_logical_not_parentheses.
1698
01177669
JJ
16992015-03-09 Jakub Jelinek <jakub@redhat.com>
1700
1701 PR c/65120
1702 * c-typeck.c (parser_build_binary_op): Don't warn for
1703 !!x == y or !b == y where b is _Bool.
1704
802ac282
MP
17052015-03-09 Marek Polacek <polacek@redhat.com>
1706
1707 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1708 * c-decl.c (grokdeclarator): Likewise.
1709 * c-typeck.c (build_binary_op): Likewise.
1710
e5165b60
MP
17112015-02-27 Marek Polacek <polacek@redhat.com>
1712
1713 PR c/65228
1714 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1715
065d214c
MP
17162015-02-14 Marek Polacek <polacek@redhat.com>
1717
1718 PR c/64768
1719 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1720 declared through a typedef name.
1721
e5d9235b
MP
17222015-02-13 Marek Polacek <polacek@redhat.com>
1723
1724 PR c/65050
1725 * c-decl.c (grokdeclarator): Print also the type when giving
1726 the error message about array's incomplete element type.
1727
fa01ffcc
JJ
17282015-02-11 Jakub Jelinek <jakub@redhat.com>
1729
1730 PR c/64824
1731 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1732 check in the POP macro.
1733
c3e38a03
MP
17342015-02-09 Marek Polacek <polacek@redhat.com>
1735
1736 PR c/64856
1737 * c-typeck.c (process_init_element): Don't always wrap
1738 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1739 initializing a range of elements.
1740
4886ec8e
JJ
17412015-02-04 Jakub Jelinek <jakub@redhat.com>
1742
1743 PR c/64824
1744 PR c/64868
1745 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1746
c3e38a03 17472015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1748
1749 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1750 processing enum declaration.
1751
7b33f0c8
MP
17522015-01-29 Marek Polacek <polacek@redhat.com>
1753
1754 PR c/64709
1755 * c-typeck.c (pop_init_level): If constructor_elements has
1756 exactly one element with integer_zerop value, set constructor_zeroinit
1757 to 1. Remove braces around warning_init call.
1758
dea63e49
JJ
17592015-01-27 Jakub Jelinek <jakub@redhat.com>
1760
1761 PR c/64766
1762 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1763 of FUNCTION_DECLs with error_mark_node.
1764
d38f7dce
JJ
17652015-01-26 Jakub Jelinek <jakub@redhat.com>
1766
1767 PR c/64778
1768 * c-typeck.c (convert_arguments): Return -1 if there are
1769 error_args, even if we've diagnosed too many arguments.
1770
cbf5d0e7
RB
17712015-01-21 Richard Biener <rguenther@suse.de>
1772
1773 PR middle-end/64313
1774 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1775 for builtins the user declared correctly.
1776
41dbbb37
TS
17772015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1778 Bernd Schmidt <bernds@codesourcery.com>
1779 Cesar Philippidis <cesar@codesourcery.com>
1780 James Norris <jnorris@codesourcery.com>
1781 Jakub Jelinek <jakub@redhat.com>
1782 Ilmir Usmanov <i.usmanov@samsung.com>
1783
1784 * c-parser.c: Include "gomp-constants.h".
1785 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1786 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1787 Use OMP_CLAUSE_SET_MAP_KIND.
1788 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1789 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1790 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1791 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1792 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1793 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1794 "copyout", "create", "delete", "deviceptr", "gang", "host",
1795 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1796 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1797 "present_or_create", "pcreate", "seq", "self", "vector",
1798 "vector_length", "wait", "worker".
1799 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1800 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1801 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1802 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1803 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1804 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1805 (c_parser_oacc_data_clause_deviceptr)
1806 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1807 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1808 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1809 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1810 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1811 (c_parser_oacc_parallel, c_parser_oacc_update)
1812 (c_parser_oacc_wait): New functions.
1813 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1814 (c_finish_oacc_data): New prototypes.
1815 * c-typeck.c: Include "gomp-constants.h".
1816 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1817 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1818 OMP_CLAUSE_SET_MAP_KIND.
1819 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1820 (c_finish_oacc_data): New functions.
1821 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1822 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1823 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1824 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1825 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1826 GOMP_MAP_FORCE_DEVICEPTR.
1827
adfac8df
JJ
18282015-01-09 Michael Collison <michael.collison@linaro.org>
1829
1830 * c-array-notation.c: Include hash-set.h, machmode.h,
1831 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1832 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1833 * c-aux-info.c: Ditto.
1834 * c-convert.c: Ditto.
1835 * c-decl.c: Ditto.
1836 * c-errors.c: Ditto.
1837 * c-lang.c: Dittoxs.
1838 * c-objc-common.c: Ditto.
1839 * c-parser.c: Ditto.
1840 * c-typeck.c: Include hash-set.h, machmode.h,
1841 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1842 fold-const.h, wide-int.h, inchash.h, real.h and
1843 fixed-value.h due to flattening of tree.h.
1844
2cc901dc
MP
18452015-01-07 Marek Polacek <polacek@redhat.com>
1846
1847 PR c/64417
1848 * c-typeck.c (process_init_element): Disallow initialization of
1849 a flexible array member with a string constant if the structure
1850 is in an array.
1851
5624e564
JJ
18522015-01-05 Jakub Jelinek <jakub@redhat.com>
1853
e5341100
JJ
1854 PR sanitizer/64344
1855 * c-typeck.c (convert_for_assignment, c_finish_return): For
1856 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1857 types also set in_late_binary_op around convert call.
1858 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1859 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1860 result on expr as last argument to ubsan_instrument_float_cast,
1861 if in_late_binary_op, don't use c_save_expr but save_expr.
1862
5624e564
JJ
1863 Update copyright years.
1864
5bd012f8
MP
18652015-01-05 Marek Polacek <polacek@redhat.com>
1866
1867 PR c/64423
1868 * c-typeck.c (build_array_ref): Pass loc down to
1869 warn_array_subscript_with_type_char.
1870
768952be
MU
18712014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1872
1873 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1874 (common-pointer-type): For pointers to arrays take qualifiers from
1875 element type.
1876 (build_conditional_expr): Add warnings for lost qualifiers.
1877 (comp-target-types): Allow pointers to arrays with different qualifiers.
1878 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1879 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1880 to PEDWARN_FOR_QUALIFIERS.
1881
8f94a8c4
JJ
18822014-12-17 Jakub Jelinek <jakub@redhat.com>
1883
1884 PR sanitizer/64289
1885 * c-convert.c: Include ubsan.h.
1886 (convert): For real -> integral casts and
1887 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1888 instead instrument the float cast directly.
1889
b731b390
JJ
18902014-11-29 Jakub Jelinek <jakub@redhat.com>
1891
1892 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1893 c_finish_stmt_expr): Remove NULL last argument from
1894 create_tmp_var_raw and create_tmp_var calls.
1895 * c-array-notation.c (fix_builtin_array_notation_fn,
1896 build_array_notation_expr, fix_conditional_array_notations_1,
1897 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1898
541e35a6
MP
18992014-11-28 Marek Polacek <polacek@redhat.com>
1900
1901 PR c/63862
1902 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1903 convert the right operand to integer type.
1904
b286be94
MP
19052014-11-25 Marek Polacek <polacek@redhat.com>
1906
1907 PR c/63877
1908 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1909 for inline functions.
1910
aa7da51a
JJ
19112014-11-21 Jakub Jelinek <jakub@redhat.com>
1912
1913 PR target/63764
1914 * c-typeck.c (build_array_ref): Adjust
1915 convert_vector_to_pointer_for_subscript caller. If it returns true,
1916 call non_lvalue_loc on the result.
1917
d876207f
RB
19182014-11-11 Richard Biener <rguenther@suse.de>
1919
1920 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1921 to true.
1922
e5e44252
AK
19232014-11-10 Andi Kleen <ak@linux.intel.com>
1924
1925 PR c/60804
1926 * c-parser.c (c_parser_statement_after_labels): Call
1927 check_no_cilk.
1928 (c_parser_if_statement): Dito.
1929 (c_parser_switch_statement): Dito.
1930 (c_parser_while_statement): Dito.
1931 (c_parser_do_statement): Dito.
1932 (c_parser_for_statement): Dito.
1933 * c-typeck.c (c_finish_loop): Dito.
1934
13c21655
PC
19352014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1936
1937 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1938 OPT_Wshift_count_overflow in the warnings.
1939
2d51fcef
MP
19402014-10-30 Marek Polacek <polacek@redhat.com>
1941
1942 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1943 print the stripped version as well, if they're not the same.
1944
ef4bddc2
RS
19452014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1946
1947 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1948 machine_mode.
1949
c582198b
AM
19502014-10-28 Andrew MacLeod <amacleod@redhat.com>
1951
1952 * c-decl.c: Adjust include files.
1953 * c-parser.c: Ditto.
1954
ddc8de03
PM
19552014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1956 Tom Tromey <tromey@redhat.com>
1957
1958 * c-tree.h (enum c_oracle_request): New.
1959 (c_binding_oracle_function): New typedef.
1960 (c_binding_oracle, c_pushtag, c_bind): Declare.
1961 * c-decl.c (c_binding_oracle): New global.
1962 (I_SYMBOL_CHECKED): New macro.
1963 (i_symbol_binding): New function.
1964 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1965 (I_TAG_CHECKED): New macro.
1966 (i_tag_binding): New function.
1967 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1968 (I_LABEL_CHECKED): New macro.
1969 (i_label_binding): New function.
1970 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1971 (c_print_identifier): Save and restore c_binding_oracle.
1972 (c_pushtag, c_bind): New functions.
1973
60393bbc
AM
19742014-10-27 Andrew MacLeod <amacleod@redhat.com>
1975
1976 * c-typeck.c: Adjust include files.
1977
d723bb7c
MLI
19782014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1979
1980 PR c++/53061
1981 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1982 initialization here...
1983 (c_initialize_diagnostics): ... but here. Set defaults after
1984 building pretty-printer.
1985
1bc5a451
MP
19862014-10-23 Marek Polacek <polacek@redhat.com>
1987
1988 PR c/63626
1989 * c-decl.c (pop_scope): Don't print warning in external_scope.
1990
4435bb92
MP
19912014-10-19 Marek Polacek <polacek@redhat.com>
1992
1993 PR c/63567
1994 * c-typeck.c (output_init_element): Allow initializing objects with
1995 static storage duration with compound literals even in C99 and add
1996 pedwarn for it.
1997
7278465e
MP
19982014-10-17 Marek Polacek <polacek@redhat.com>
1999
2000 PR c/63567
2001 * c-typeck.c (digest_init): Allow initializing objects with static
2002 storage duration with compound literals even in C99 and add pedwarn
2003 for it.
2004
d9b7be2e
MP
20052014-10-17 Marek Polacek <polacek@redhat.com>
2006
2007 PR c/63543
2008 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2009 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2010 error multiple times. Print the type.
2011
f406ae1f
MP
20122014-10-17 Marek Polacek <polacek@redhat.com>
2013
2014 PR c/63549
2015 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2016 type.
2017
92574c7c
MP
20182014-10-17 Marek Polacek <polacek@redhat.com>
2019
2020 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2021 (start_function): Use OPT_Wimplicit_int instead of 0.
2022 (store_parm_decls_oldstyle): Likewise.
2023
1bc4a978
MT
20242014-10-17 Alan Modra <amodra@gmail.com>
2025
2026 PR middle-end/61848
2027 * c-decl.c (merge_decls): Don't merge section name or tls model
2028 to newdecl symtab node, instead merge to olddecl. Override
2029 existing olddecl section name. Set tls_model for all thread-local
2030 vars, not just OMP thread-private ones. Remove incorrect comment.
2031
83685514
AM
20322014-10-16 Andrew MacLeod <amacleod@redhat.com>
2033
2034 * c-decl.c: Adjust include files.
2035
78a7c317
DD
20362014-10-14 DJ Delorie <dj@redhat.com>
2037
2038 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2039 (c_token_starts_typename): Check all __intN, not just __int128.
2040 (c_token_starts_declspecs): Likewise.
2041 (c_parser_declspecs): Likewise.
2042 (c_parser_attribute_any_word): Likewise.
2043 (c_parser_objc_selector): Likewise.
2044 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2045 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2046 is specified.
2047 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2048 __int128.
2049 (finish_declspecs): Likewise.
2050
74d98c1e
AB
20512014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2052
2053 * c-parser.c (c_parser_all_labels): New function to replace
2054 the duplicate code.
2055 (c_parser_statement): Call the new function.
2056
84937de2
MP
20572014-10-09 Marek Polacek <polacek@redhat.com>
2058
2059 PR c/63480
2060 * c-typeck.c (pop_init_level): Don't warn about initializing
2061 with { }.
2062
0382aaa0
MP
20632014-10-07 Marek Polacek <polacek@redhat.com>
2064
2065 PR c/59717
2066 * c-decl.c (header_for_builtin_fn): New function.
2067 (implicitly_declare): Suggest which header to include.
2068
7a0ca710
MP
20692014-10-07 Marek Polacek <polacek@redhat.com>
2070
2071 * c-convert.c (convert): Use error_operand_p.
2072 * c-typeck.c (require_complete_type): Likewise.
2073 (really_atomic_lvalue): Likewise.
2074 (digest_init): Likewise.
2075 (handle_omp_array_sections_1): Likewise.
2076
6bc8a126
MP
20772014-10-03 Marek Polacek <polacek@redhat.com>
2078
2079 PR c/63453
2080 * c-decl.c (pop_scope): Don't warn about "inline function declared
2081 but never defined" for functions marked with gnu_inline attribute.
2082
d90c0a59
JJ
20832014-09-25 Jakub Jelinek <jakub@redhat.com>
2084
2085 PR c++/63249
2086 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2087 on low_bound and length.
2088
083e891e
MP
20892014-09-24 Marek Polacek <polacek@redhat.com>
2090
2091 PR c/61405
2092 PR c/53874
2093 * c-parser.c: Don't define CPP_KEYWORD.
2094 (c_parser_switch_statement): Pass original type to c_finish_case.
2095 * c-tree.h (c_finish_case): Update declaration.
2096 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2097 conditionally to c_do_switch_warnings.
2098
8d95fe25
MP
20992014-09-03 Marek Polacek <polacek@redhat.com>
2100
2101 PR c/62024
2102 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2103 conversions.
2104
9a771876
JJ
21052014-09-02 Jakub Jelinek <jakub@redhat.com>
2106 Balaji V. Iyer <balaji.v.iyer@intel.com>
2107 Igor Zamyatin <igor.zamyatin@intel.com>
2108
2109 * c-parser.c (c_parser_cilk_for): New function.
2110 (c_parser_cilk_grainsize): Likewise.
2111 (c_get_temp_regvar): Likewise.
2112 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2113 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2114 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2115 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2116 case.
2117
b7679d96
CG
21182014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2119
2120 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2121 with using HOST_WIDE_INT without truncation to 'int'
2122
59ea0364
MP
21232014-08-22 Marek Polacek <polacek@redhat.com>
2124
2125 PR c++/62199
2126 * c-typeck.c (parser_build_binary_op): Adjust call to
2127 warn_logical_not_parentheses.
2128
671a475e
IZ
21292014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2130
2131 PR other/62008
2132 * c-parser.c (c_parser_array_notation): Check for correct
2133 type of an array added.
2134
04159acf
MP
21352014-08-19 Marek Polacek <polacek@redhat.com>
2136
2137 PR c++/62153
2138 * c-typeck.c (build_binary_op): If either operand of a comparison
2139 is a boolean expression, call maybe_warn_bool_compare.
2140
c77935ee
PP
21412014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2142
2143 PR c/45584
2144 * c-typeck.c (build_c_cast): Do a conversion even when the
2145 TYPE_MAIN_VARIANTs are the same.
2146
35aff4fb
MP
21472014-08-19 Marek Polacek <polacek@redhat.com>
2148
2149 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2150 pedwarn_c99 instead of pedwarn.
2151 (grokfield): Likewise.
2152 (warn_defaults_to): New function.
2153 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2154 Unconditionally call pedwarn_c99 instead of pedwarn.
2155 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2156 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2157 check flag_isoc11 before.
2158 * c-errors.c (pedwarn_c99): Change the return type to bool.
2159 Handle -Wc99-c11-compat.
2160 * c-parser.c (disable_extension_diagnostics): Handle
2161 warn_c99_c11_compat.
2162 (restore_extension_diagnostics): Likewise.
2163 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2164 instead of pedwarn, don't check flag_isoc11 before.
2165 (c_parser_declspecs): Likewise.
2166 (c_parser_alignas_specifier): Likewise.
2167 (c_parser_alignof_expression): Likewise.
2168 (c_parser_generic_selection): Likewise.
2169 * c-tree.h (pedwarn_c99): Update declaration.
2170 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2171 of pedwarn_c99.
2172
177cce46
MP
21732014-08-19 Marek Polacek <polacek@redhat.com>
2174
2175 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2176 to pedwarn_c90.
2177 * c-errors.c: Include "opts.h".
2178 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2179 * c-parser.c (disable_extension_diagnostics): Handle negative value
2180 of warn_c90_c99_compat, too.
2181 (restore_extension_diagnostics): Likewise.
2182 (c_parser_compound_statement_nostart): Pass
2183 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2184
6dc99c33
MP
21852014-08-12 Marek Polacek <polacek@redhat.com>
2186
2187 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2188 Add pedwarn.
2189 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2190 Likewise.
2191 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2192
f3bede71
MP
21932014-08-10 Marek Polacek <polacek@redhat.com>
2194
2195 PR c/51849
2196 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2197 Call pedwarn_c90 instead of pedwarn.
2198 (check_bitfield_type_and_width): Likewise.
2199 (declspecs_add_qual): Likewise.
2200 (declspecs_add_type): Likewise.
2201 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2202 Adjust to only call pedwarn_c90.
2203 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2204 pedwarn_c90 instead of pedwarn.
2205 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2206 * c-parser.c (disable_extension_diagnostics): Handle
2207 warn_c90_c99_compat.
2208 (restore_extension_diagnostics): Likewise.
2209 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2210 pedwarn_c90 instead of pedwarn.
2211 (c_parser_initelt): Likewise.
2212 (c_parser_postfix_expression): Likewise.
2213 (c_parser_postfix_expression_after_paren_type): Likewise.
2214 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2215 * c-tree.h: Fix formatting.
2216 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2217 pedwarn_c90 instead of pedwarn.
2218
9f25a338
TS
22192014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2220
2221 * c-typeck.c: Remove include of pointer-set.h.
2222
044331a8
MP
22232014-08-07 Marek Polacek <polacek@redhat.com>
2224
2225 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2226
b787e7a2
TS
22272014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2228
2229 * c-typeck.c: Use hash_map instead of pointer_map.
2230
6e2830c3
TS
22312014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2232
2233 * c-decl.c: Use hash_set instead of pointer_set.
2234
a7ee52fb
IZ
22352014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2236
2237 PR middle-end/61455
2238 * c-array-notation.c (expand_array_notations): Handling
2239 of DECL_EXPR added.
2240
b4dfdc11
MG
22412014-07-31 Marc Glisse <marc.glisse@inria.fr>
2242
2243 PR c++/60517
2244 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2245 a local variable.
2246
976d5a22
TT
22472014-07-30 Tom Tromey <tromey@redhat.com>
2248
2249 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2250 field.
2251 (really_start_incremental_init, push_init_level): Initialize
2252 designator_depth.
2253 (pop_init_level): Set global designator_depth.
2254 (process_init_element): Check for designated_init attribute.
2255
30281de2
MP
22562014-07-20 Marek Polacek <polacek@redhat.com>
2257
2258 PR c/61852
2259 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2260 (implicitly_declare): Pass location to implicit_decl_warning.
2261
b108f48f
JJ
22622014-07-14 Jakub Jelinek <jakub@redhat.com>
2263
2264 PR middle-end/61294
2265 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2266 If non-NULL, call c_parser_check_literal_zero.
2267 (c_parser_check_literal_zero): New function.
2268 (c_parser_postfix_expression_after_primary): Adjust
2269 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2270
773ec47f
MP
22712014-07-06 Marek Polacek <polacek@redhat.com>
2272
2273 PR c/6940
2274 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2275 * c-tree.h (C_ARRAY_PARAMETER): Define.
2276 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2277 function parameter.
2278
22e1cf1c
JH
22792014-07-02 Jan Hubicka <hubicka@ucw.cz>
2280 Chen Gang <gang.chen.5i5j@gmail.com>
2281
2282 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2283 releasing symbol.
2284
52ec0ea3
MP
22852014-07-01 Marek Polacek <polacek@redhat.com>
2286
2287 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2288 instead of 0 to WARN_FOR_ASSIGNMENT.
2289
d5c3d343
MP
22902014-07-01 Marek Polacek <polacek@redhat.com>
2291
2292 PR c/58286
2293 * c-typeck.c (convert_for_assignment): Pass
2294 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2295
6a7253a4
MP
22962014-06-30 Marek Polacek <polacek@redhat.com>
2297
2298 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2299 has no_sanitize_undefined attribute.
2300
5e88a8f4
IZ
23012014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2302
2303 PR middle-end/57541
2304 * c-array-notation.c (fix_builtin_array_notation_fn):
2305 Check for 0 arguments in builtin call. Check that bultin argument is
2306 correct.
2307 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2308 index.
2309
9698b078
SH
23102014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2311
2312 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2313 qualifiers in __auto_type for atomic types.
2314 (c_parser_typeof_specifier): Discard all type qualifiers in
2315 __typeof__ for atomic types.
2316
6e07c515
MP
23172014-06-25 Marek Polacek <polacek@redhat.com>
2318
2319 PR c/61162
2320 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2321 the return expression to c_finish_return.
2322
da6f124d
JJ
23232014-06-25 Jakub Jelinek <jakub@redhat.com>
2324
2325 * c-typeck.c (c_finish_omp_clauses): Make sure
2326 OMP_CLAUSE_LINEAR_STEP has correct type.
2327
c203e8a7
TS
23282014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2329
2330 * c-decl.c: Adjust.
2331
56ad0e38
JJ
23322014-06-24 Jakub Jelinek <jakub@redhat.com>
2333
2334 * c-parser.c (c_parser_omp_for_loop): For
2335 #pragma omp parallel for simd move lastprivate clause from parallel
2336 to for rather than simd.
2337
47c2554f
MP
23382014-06-23 Marek Polacek <polacek@redhat.com>
2339
2340 * c-typeck.c (parser_build_binary_op): Don't call
2341 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2342
56363ffd
JH
23432014-06-15 Jan Hubicka <hubicka@ucw.cz>
2344
2345 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2346 * c-decl.c (merge_decls): Likewise.
2347
d7ff7ae5
MP
23482014-06-09 Marek Polacek <polacek@redhat.com>
2349
2350 PR c/36446
2351 * c-typeck.c (error_init): Call inform instead of error_at.
2352 (pedwarn_init): Call inform instead of pedwarn.
2353 (warning_init): Call inform instead of warning_at.
2354
24d047a3
JH
23552014-06-07 Jan Hubicka <hubicka@ucw.cz>
2356
2357 * c-decl.c (merge_decls): Use set_decl_section_name.
2358 (duplicate_decls): Remove node if it exists.
2359
9bac5cbb
G
23602014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2361
2362 PR c/53119
2363 * c-typeck.c (push_init_level, process_init_element,
2364 pop_init_level): Correct check for zero initialization, move
2365 missing brace warning to respect zero initialization.
2366
8ffcdea8
MP
23672014-06-05 Marek Polacek <polacek@redhat.com>
2368
2369 PR c/56724
2370 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2371
742938c9
MP
23722014-06-05 Marek Polacek <polacek@redhat.com>
2373
2374 PR c/49706
2375 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2376 on the left hand side operand of a comparison.
2377
6447c55d
MP
23782014-06-05 Marek Polacek <polacek@redhat.com>
2379
2380 PR c/48062
2381 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2382 Print note only if the warning was printed.
2383
9dc7743c
IZ
23842014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2385
2386 PR c/58942
2387 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2388 with a pointer.
2389
fedfecef
MP
23902014-06-03 Marek Polacek <polacek@redhat.com>
2391
2392 PR c/60439
2393 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2394 c_start_case.
2395 * c-tree.h (c_start_case): Update.
2396 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2397 switch condition has boolean value.
2398
9b2b7279
AM
23992014-06-02 Andrew MacLeod <amacleod@redhat.com>
2400
2401 * c-decl.c: Include builtins.h.
2402 * c-parser.c: Likewise.
2403
5c1bc275
MP
24042014-05-27 Marek Polacek <polacek@redhat.com>
2405
2406 PR c/56724
2407 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2408 error and warning calls to error_at and warning_at. Pass location of
2409 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2410 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2411 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2412
97563bc8
IZ
24132014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2414
2415 PR c/61191
2416 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2417 function parameters.
2418
aede2c10
JH
24192014-05-23 Jan Hubicka <hubicka@ucw.cz>
2420
2421 * c-decl.c (merge_decls): Preserve symtab node pointers.
2422 (duplicate_decls): Free new decl.
2423
edbba2ce
TS
24242014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2425
f3316c6d
TS
2426 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2427 initialization.
2428
edbba2ce
TS
2429 * c-parser.c (c_parser_omp_target): Return bool values.
2430
68c81f24
TS
24312014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2432
2433 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2434 num_teams_loc variable to num_thread_limit_loc.
2435
632f2871
RS
24362014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2437
2438 * c-array-notation.c (expand_array_notations): Use void_node
2439 instead of void_zero_node.
2440
766090c2
TS
24412014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2442
2443 * c-decl.c (finish_struct): Adjust.
2444 (finish_enum): Likewise.
2445 (bind): Adjust.
2446 (record_inline_static): Likewise.
2447 (push_scope): Likewise.
2448 (make_label): Likewise.
2449 (lookup_label_for_goto): Likewise.
2450 (finish_struct): Likewise.
2451 (finish_enum): Likewise.
2452 (store_parm_decls): Likewise.
2453 (c_push_function_context): Likewise.
2454 * c-lang.h: Remove usage of variable_size gty attribute.
2455 * c-parser.c (c_parse_init): Adjust.
2456 (c_parse_file): Likewise.
2457
2b107f6b
MP
24582014-05-13 Marek Polacek <polacek@redhat.com>
2459
2460 PR c/61162
2461 * c-typeck.c (convert_for_assignment): Pass location to
2462 WARN_FOR_ASSIGNMENT instead of input_location.
2463
d033409e
MP
24642014-05-10 Marek Polacek <polacek@redhat.com>
2465
2466 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2467 maybe_warn_string_init.
2468 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2469 maybe_warn_string_init.
2470 * c-tree.h (maybe_warn_string_init): Update declaration.
2471 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2472 Call pedwarn_init with loc instead of with input_location.
2473 (digest_init): Pass init_loc to maybe_warn_string_init.
2474 (pop_init_level): Call pedwarn_init with loc instead of with
2475 input_location.
2476 (set_init_index): Likewise.
2477 (process_init_element): Likewise.
2478
ea58ef42
MP
24792014-05-09 Marek Polacek <polacek@redhat.com>
2480
2481 PR c/61096
2482 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2483 (c_parser_initelt): Pass location to set_init_label. Pass array index
2484 location to set_init_index.
2485 * c-tree.h (push_init_level): Update declaration.
2486 (pop_init_level): Likewise.
2487 (set_init_index): Likewise.
2488 (set_init_label): Likewise.
2489 * c-typeck.c (error_init): Add location parameter. Call error_at
2490 instead of error.
2491 (digest_init): Pass init_loc to error_init.
2492 (really_start_incremental_init):
2493 (push_init_level): Add location parameter. Pass loc to pop_init_level
2494 and error_init.
2495 (pop_init_level): Likewise.
2496 (set_designator): Add location parameter. Pass loc to pop_init_level,
2497 push_init_level, and error_init.
2498 (set_init_index): Add location parameter. Pass loc to error_init and
2499 set_designator.
2500 (set_init_label): Likewise.
2501 (output_init_element): Pass loc to error_init.
2502 (process_init_element): Pass loc to error_init, pop_init_level,
2503 pedwarn_init, and push_init_level.
2504
661a0813
MP
25052014-05-09 Marek Polacek <polacek@redhat.com>
2506
2507 PR c/50459
2508 * c-parser.c (c_parser_attributes): Parse the arguments as an
2509 expression-list if the attribute takes identifier.
2510
2793eeab
MP
25112014-05-08 Marek Polacek <polacek@redhat.com>
2512
2513 PR c/61053
2514 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2515 TYPE_ALIGN_UNIT.
2516
f827930a
MP
25172014-05-08 Marek Polacek <polacek@redhat.com>
2518
2519 PR c/61077
2520 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2521 of main.
2522
1d60af08
KZ
25232014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2524 Mike Stump <mikestump@comcast.net>
2525 Richard Sandiford <rdsandiford@googlemail.com>
2526
2527 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2528 (finish_enum): Use wide-int interfaces.
2529 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2530 * c-typeck.c (build_c_cast): Likewise.
2531 (set_nonincremental_init_from_string): Likewise.
2532 (c_tree_equal): Likewise.
2533
a0e24419
MP
25342014-05-02 Marek Polacek <polacek@redhat.com>
2535
2536 PR c/25801
2537 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2538 Return size_one_node when the type is not complete.
2539 (pointer_diff): Remove comment.
2540 (build_unary_op): Improve error messages.
2541
19fc9faa
MP
25422014-05-02 Marek Polacek <polacek@redhat.com>
2543
2544 * c-typeck.c (c_finish_return): Separate warning_at calls.
2545
63bc4e87
MP
25462014-05-02 Marek Polacek <polacek@redhat.com>
2547
2548 * c-tree.h (error_init): Remove declaration.
2549 (pedwarn_init): Likewise.
2550 * c-typeck.c (error_init): Make static and move above.
2551 (pedwarn_init): Likewise.
2552 (warning_init): Move above.
2553 (maybe_warn_string_init): Likewise.
2554
4bd2511b
JL
25552014-05-01 Jeff Law <law@redhat.com>
2556
2557 Revert:
2558
2559 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2560 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2561 avoid goto.
2562
6a358dcb
MP
25632014-05-02 Marek Polacek <polacek@redhat.com>
2564
2565 PR c/60784
2566 * c-typeck.c (push_init_level): Set constructor_designated to
2567 p->designated for structures.
2568
ae5ebda4
MP
25692014-05-01 Marek Polacek <polacek@redhat.com>
2570
2571 PR c/60915
2572 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2573 function-definition has an attribute after the declarator.
2574
96b40f8d
MP
25752014-05-01 Marek Polacek <polacek@redhat.com>
2576
2577 PR c/60257
2578 * c-typeck.c (warning_init): Add location_t parameter. Call
2579 warning_at instead of warning.
2580 (push_init_level): Pass input_location to warning_init.
2581 (add_pending_init): Add location_t parameter. Pass loc to
2582 warning_init.
2583 (set_nonincremental_init): Pass input_location to add_pending_init.
2584 (set_nonincremental_init_from_string): Likewise.
2585 (output_init_element): Pass loc to warning_init and to
2586 add_pending_init.
2587
32e00768
MP
25882014-05-01 Marek Polacek <polacek@redhat.com>
2589
2590 PR c/43395
2591 * c-typeck.c (c_finish_return): Distinguish between label and variable
2592 when warning about returning local address.
2593
c9379ce2
MP
25942014-05-01 Marek Polacek <polacek@redhat.com>
2595
2596 PR c/29467
2597 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2598 in C89 mode.
2599
d00887e8
MP
26002014-05-01 Marek Polacek <polacek@redhat.com>
2601
2602 PR c/43245
2603 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2604 instead of 0 to WARN_FOR_QUALIFIERS.
2605
5436fa2e
MP
26062014-05-01 Marek Polacek <polacek@redhat.com>
2607
2608 PR c/56989
2609 * c-typeck.c (default_conversion): Use better location for
2610 error call.
2611
f8ed5150
MP
26122014-04-30 Marek Polacek <polacek@redhat.com>
2613
2614 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2615 also when SANITIZE_FLOAT_DIVIDE is on.
2616
8337d1db
MP
26172014-04-30 Marek Polacek <polacek@redhat.com>
2618
2619 PR c/60139
2620 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2621 and pedwarn_init. Use loc insted of input_location.
2622
c4bdc42f
MP
26232014-04-30 Marek Polacek <polacek@redhat.com>
2624
2625 PR c/60351
2626 * c-typeck.c (build_binary_op): Use location when warning about
2627 shift count.
2628
45484dcf
MP
26292014-04-25 Marek Polacek <polacek@redhat.com>
2630
2631 PR c/18079
2632 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2633 always_inline/noinline and hot/cold attributes.
2634
34cf811f
MP
26352014-04-25 Marek Polacek <polacek@redhat.com>
2636
2637 PR c/60114
2638 * c-parser.c (c_parser_initelt): Pass input_location to
2639 process_init_element.
2640 (c_parser_initval): Pass loc to process_init_element.
2641 * c-tree.h (process_init_element): Adjust declaration.
2642 * c-typeck.c (push_init_level): Pass input_location to
2643 process_init_element.
2644 (pop_init_level): Likewise.
2645 (set_designator): Likewise.
2646 (output_init_element): Add location_t parameter. Pass loc to
2647 digest_init.
2648 (output_pending_init_elements): Pass input_location to
2649 output_init_element.
2650 (process_init_element): Add location_t parameter. Pass loc to
2651 output_init_element.
2652
42056eac
JJ
26532014-04-24 Jakub Jelinek <jakub@redhat.com>
2654
2655 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2656 atomic-clause, allow comma in between atomic-clause and
2657 seq_cst.
2658
e162a134
JJ
26592014-04-22 Jakub Jelinek <jakub@redhat.com>
2660
2661 PR c/59073
2662 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2663 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2664
2f6babac
IZ
26652014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2666
2667 PR middle-end/60469
2668 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2669 create_tmp_var instead build_decl for creating temps.
2670 (build_array_notation_expr): Likewise.
2671 (fix_conditional_array_notations_1): Likewise.
2672 (fix_array_notation_expr): Likewise.
2673 (fix_array_notation_call_expr): Likewise.
2674
8edbfaa6
JJ
26752014-03-28 Jakub Jelinek <jakub@redhat.com>
2676
2677 PR c++/60689
2678 * c-tree.h (c_build_function_call_vec): New prototype.
2679 * c-typeck.c (build_function_call_vec): Don't call
2680 resolve_overloaded_builtin here.
2681 (c_build_function_call_vec): New wrapper function around
2682 build_function_call_vec. Call resolve_overloaded_builtin here.
2683 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2684 Call c_build_function_call_vec instead of build_function_call_vec.
2685 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2686 * c-decl.c (finish_decl): Likewise.
2687
7485aeea
MLI
26882014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2689
2690 PR c/55383
2691 * c-typeck.c: Use correct format string in cast-qual warning
2692
b17a8b07
TS
26932014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2694
2695 * c-decl.c (c_decl_attributes): Use
2696 lang_hooks.types.omp_mappable_type.
2697 * c-typeck.c (c_finish_omp_clauses): Likewise.
2698
3af9c5e9
MP
26992014-03-06 Marek Polacek <polacek@redhat.com>
2700
2701 PR c/60197
2702 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2703 of checking tree code.
2704
1c9f5f33
PK
27052014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2706
2707 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2708 (c_parser_parameter_declaration): Likewise.
2709
cc28fc7f
MP
27102014-02-19 Marek Polacek <polacek@redhat.com>
2711
2712 PR c/60195
2713 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2714 Call mark_exp_read on exp.value.
2715 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2716 TREE_ADDRESSABLE on old instead of val.
2717 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2718
b581c05c
PK
27192014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2720
2721 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2722 C_EXPR_APPEND by vec_safe_push.
2723 * c-tree.h (C_EXPR_APPEND): Remove.
2724
81e5eca8
MP
27252014-01-31 Marek Polacek <polacek@redhat.com>
2726
2727 PR c/59963
2728 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2729 build_function_call_vec.
2730 (build_function_call): Likewise.
2731 (build_atomic_assign): Likewise.
2732 (build_function_call_vec): Add arg_loc parameter. Use it.
2733 (convert_arguments): Likewise.
2734 (convert_for_assignment): Rename rhs_loc to expr_loc.
2735 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2736 (c_parser_objc_keywordexpr): Likewise.
2737 (c_parser_postfix_expression_after_primary): Call
2738 build_function_call_vec with expr_loc rather than op_loc.
2739 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2740 build_function_call_vec.
2741 (c_parser_expr_list): Add locations parameter. Fill it with locations
2742 of function arguments.
2743 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2744
68fca595
MP
27452014-01-30 Marek Polacek <polacek@redhat.com>
2746
2747 PR c/59940
2748 * c-typeck.c (build_function_call_vec): Use loc parameter.
2749 (convert_arguments): Add location parameter. Use it.
2750 (ep_convert_and_check): Likewise.
2751 (build_atomic_assign): Adjust convert_for_assignment call.
2752 (build_modify_expr): Likewise.
2753 (digest_init): Likewise.
2754 (c_finish_return): Likewise.
2755 (build_conditional_expr): Adjust ep_convert_and_check calls.
2756 (convert_for_assignment): Add rhs_loc parameter. Use it.
2757 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2758 calls.
2759
fa337f3a
RB
27602014-01-30 Richard Biener <rguenther@suse.de>
2761
2762 PR c/59905
2763 * c-typeck.c (build_function_call_vec): Do not replace calls
2764 to a function via an incompatible type with a runtime abort.
2765
b72271b9
BI
27662014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2767
2768 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2769 flag_enable_cilkplus with flag_cilkplus.
2770 (c_parser_direct_declarator_inner): Likewise.
2771 (c_parser_attribute_any_word): Likewise.
2772 (c_parser_attributes): Likewise.
2773 (c_parser_compound_statement): Likewise.
2774 (c_parser_statement_after_labels): Likewise.
2775 (c_parser_if_statement): Likewise.
2776 (c_parser_switch_statement): Likewise.
2777 (c_parser_do_statement): Likewise.
2778 (c_parser_for_statement): Likewise.
2779 (c_parser_unary_expression): Likewise.
2780 (c_parser_postfix_expression): Likewise.
2781 (c_parser_postfix_expression_after_primary): Likewise.
2782 (c_parser_postfix_expression_after_primary): Likewise.
2783 (c_parser_omp_clause_name): Likewise.
2784 (c_finish_omp_declare_simd): Likewise.
2785 (c_parser_cilk_verify_simd): Likewise.
2786 * c-typeck.c (build_array_ref): Likewise.
2787 (build_function_call_vec): Likewise.
2788 (convert_arguments): Likewise.
2789 (build_compound_expr): Likewise.
2790 (c_finish_return): Likewise.
2791 (c_finish_if_stmt): Likewise.
2792 (c_finish_loop): Likewise.
2793 (build_binary_op): Likewise.
2794
393e8e8b
MP
27952014-01-23 Marek Polacek <polacek@redhat.com>
2796
2797 PR c/59846
2798 * c-typeck.c (parser_build_binary_op): Use location instead of
2799 input_location.
2800 (build_binary_op): Pass location to shorten_compare.
2801
f04dda30
MP
28022014-01-23 Marek Polacek <polacek@redhat.com>
2803
2804 PR c/58346
2805 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2806 an empty aggregate.
2807
789eadcd
MP
28082014-01-23 Marek Polacek <polacek@redhat.com>
2809
2810 PR c/59871
2811 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2812 of a comma expression.
2813 (emit_side_effect_warnings): Likewise.
2814
40f14e9f
BI
28152014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2816
2817 PR c/59825
2818 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2819 function to use walk_tree and moved a lot of its functionality to
2820 expand_array_notations.
2821 (expand_array_notations): New function.
2822
74558dd9
BI
28232014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2824
2825 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2826 attribute an attribute without value.
2827
652fea39
JJ
28282014-01-23 Jakub Jelinek <jakub@redhat.com>
2829
2830 PR middle-end/58809
2831 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2832 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2833
f34f1c87
MP
28342014-01-22 Marek Polacek <polacek@redhat.com>
2835
2836 PR c/59891
2837 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2838 of remove_c_maybe_const_expr on op1 and op2.
2839
241f845a
JJ
28402014-01-15 Jakub Jelinek <jakub@redhat.com>
2841
2842 PR c/58943
2843 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2844 effects, preevaluate rhs using SAVE_EXPR first.
2845
9a74f20c
BI
28462014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2847
2848 PR c++/59631
2849 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2850 statements with if-elseif statements.
2851
96066ce1
MP
28522014-01-06 Marek Polacek <polacek@redhat.com>
2853
2854 PR c/57773
2855 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2856 defined bit-field types only in ISO C.
2857
23a5b65a
RS
28582014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2859
2860 Update copyright years
2861
f9030485
RS
28622014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2863
2864 * c-array-notation.c: Use the standard form for the copyright notice.
2865
41958c28
BI
28662013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2867
2868 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2869 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2870 field in parser is not empty. If not-empty, call the function
2871 c_parser_finish_omp_declare_simd.
2872 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2873 between SIMD-enabled functions and #pragma simd. Added new parameter.
2874 (c_parser_cilk_all_clauses): Modified the usage of the function
2875 c_parser_cilk_clause_vectorlength as mentioned above.
2876 (c_parser_cilk_simd_fn_vector_attrs): New function.
2877 (c_finish_cilk_simd_fn_tokens): Likewise.
2878 (is_cilkplus_vector_p): Likewise.
2879 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2880 "nomask," and "mask" strings in clause name.
2881 (c_parser_omp_all_clauses): Added 3 new case statements:
2882 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2883 PRAGMA_CILK_CLAUSE_NOMASK.
2884 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2885 check for vector attribute and if so call the function
2886 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2887 called the function c_finish_cilk_simd_fn_tokens.
2888 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2889 parser field is non-empty. If so, parse them as you would parse
2890 the omp declare simd pragma.
2891 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2892 Added a check when step is a parameter and flag it as error.
2893 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2894 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2895 pragma_omp_clause.
2896
cef0fd0e
TS
28972013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2898
2899 * c-parser.c (c_parser_omp_parallel): Fix description.
2900
12893402
BI
29012013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2902
2903 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2904 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2905 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2906 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2907
296674db
JM
29082013-12-04 Joseph Myers <joseph@codesourcery.com>
2909
2910 PR c/52023
2911 * c-parser.c (c_parser_alignas_specifier): Use
2912 c_sizeof_or_alignof_type instead of c_alignof.
2913 (c_parser_alignof_expression): Likewise, with min_alignof
2914 parameter depending on alignof spelling used.
2915
edd28054
MP
29162013-12-04 Marek Polacek <polacek@redhat.com>
2917
2918 PR c/54113
2919 * c-decl.c (start_function): Don't warn for missing prototype for
2920 inline functions.
2921
da0fc454
MP
29222013-12-03 Marek Polacek <polacek@redhat.com>
2923
2924 PR c/59351
2925 * c-decl.c (build_compound_literal): Allow compound literals with
2926 empty initial value.
2927
4c2ecab0
JM
29282013-12-02 Joseph Myers <joseph@codesourcery.com>
2929
2930 PR c/58235
2931 * c-typeck.c (build_modify_expr): Diagnose assignment to
2932 expression with array type.
2933
340baef7
JM
29342013-11-29 Joseph Myers <joseph@codesourcery.com>
2935
2936 PR c/42262
2937 * c-typeck.c (process_init_element): Do not treat a string as
2938 initializing a whole array when used with a designator for an
2939 individual element.
2940
6763b9f7
JM
29412013-11-29 Joseph Myers <joseph@codesourcery.com>
2942
2943 PR c/57574
2944 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2945 an inline function following a static declaration.
2946
e7bd1de1
JJ
29472013-11-28 Jakub Jelinek <jakub@redhat.com>
2948
2949 PR c/59310
2950 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2951 to p_name before calling c_parser_omp_teams instead of after.
2952 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2953 argument. Remove unused p_name variable.
2954
0136f8f0
AH
29552013-11-27 Aldy Hernandez <aldyh@redhat.com>
2956 Jakub Jelinek <jakub@redhat.com>
2957
2958 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2959 external_scope is NULL.
2960
241b71bb
TV
29612013-11-27 Tom de Vries <tom@codesourcery.com>
2962 Marc Glisse <marc.glisse@inria.fr>
2963
2964 PR c++/59032
2965 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2966
2fb9a547
AM
29672013-11-22 Andrew MacLeod <amacleod@redhat.com>
2968
2969 * c-typeck.c: Add required include files from gimple.h.
2970
8400e75e
DM
29712013-11-22 David Malcolm <dmalcolm@redhat.com>
2972
2973 * c-decl.c (define_label, shadow_tag_warned)
2974 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2975 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2976 (declspecs_add_type): Remove use of in_system_header macro.
2977 * c-parser.c (c_parser_unary_expression): Likewise.
2978 * c-typeck.c (store_init_value, process_init_element)
2979 (c_start_case): Likewise.
2980
2981 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2982 macro.
2983
2984 * c-parser.c (c_parser_set_source_position_from_token): Remove
2985 reference to in_system_header from comment.
2986
386b1f1f
RS
29872013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2988
2989 * c-decl.c (grokdeclarator): Update comment to refer to
2990 tree_to_[su]hwi rather than tree_low_cst.
2991
ae7e9ddd
RS
29922013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2993
2994 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2995 tree_to_uhwi throughout.
2996
9439e9a1
RS
29972013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2998
2999 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3000 throughout.
3001
9541ffee
RS
30022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3003
3004 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3005 throughout.
3006
c02065fc
AH
30072013-11-15 Aldy Hernandez <aldyh@redhat.com>
3008
3009 * c-parser.c (c_parser_cilk_simd): New.
3010 (c_parser_cilk_verify_simd): New.
3011 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3012 (c_parser_omp_for_loop): Add case for NE_EXPR.
3013 Set c_break_label for CILK_SIMD.
3014 (c_parser_cilk_clause_vectorlength): New.
3015 (c_parser_cilk_clause_linear): New.
3016 (c_parser_cilk_clause_name): New.
3017 (c_parser_cilk_all_clauses): New.
3018 * c-typeck.c (build_unary_op): Pass location argument to
3019 readonly_error.
3020 (build_modify_expr): Same.
3021 (build_asm_expr): Same.
3022 (c_finish_bc_stmt): Error on break/continue in loops.
3023
18f429e2
AM
30242013-11-14 Andrew MacLeod <amacleod@redhat.com>
3025
3026 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3027
d8a2d370
DN
30282013-11-14 Diego Novillo <dnovillo@google.com>
3029
3030 * c-decl.c: Include print-tree.h.
3031 Include stor-layout.h.
3032 Include varasm.h.
3033 Include attribs.h.
3034 Include stringpool.h.
3035 * c-lang.c: Include fold-const.h.
3036 * c-parser.c: Include stringpool.h.
3037 Include attribs.h.
3038 Include stor-layout.h.
3039 Include varasm.h.
3040 Include trans-mem.h.
3041 * c-typeck.c: Include stor-layout.h.
3042 Include trans-mem.h.
3043 Include varasm.h.
3044 Include stmt.h.
3045
38b7bc7f
JM
30462013-11-13 Joseph Myers <joseph@codesourcery.com>
3047
3048 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3049 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3050 __auto_type.
3051 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3052 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3053 RID_AUTO_TYPE.
3054 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3055 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3056 (c_parser_declarator, c_parser_direct_declarator_inner)
3057 (c_parser_parameter_declaration, c_parser_type_name): All callers
3058 changed.
3059 (c_parser_declaration_or_fndef): Handle declarations with type
3060 determined from the initializer.
3061
45b0be94
AM
30622013-11-12 Andrew MacLeod <amacleod@redhat.com>
3063
18f429e2 3064 * c-typeck.c: Include gimplify.h.
45b0be94 3065
582d9b50
JM
30662013-11-12 Joseph Myers <joseph@codesourcery.com>
3067
3068 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3069 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3070 comment.
3071 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3072 or _Thread_local as appropriate in diagnostics.
3073 (build_null_declspecs): Initialize ret->thread_gnu_p.
3074 (declspecs_add_scspec): Handle either __thread or _Thread_local
3075 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3076 pedantic. Do not disallow _Thread_local extern and _Thread_local
3077 static.
3078
267bac10
JM
30792013-11-07 Joseph Myers <joseph@codesourcery.com>
3080 Andrew MacLeod <amacleod@redhat.com>
3081
3082 * c-aux-info.c (gen_type): Handle atomic qualifier.
3083 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3084 qualifiers when compating types.
3085 (shadow_tag_warned): Handle atomic_p in declspecs.
3086 (quals_from_declspecs): Likewise.
3087 (start_decl): Use c_type_promotes_to when promoting argument
3088 types.
3089 (grokdeclarator): Handle _Atomic.
3090 (get_parm_info): Diagnose any qualifier on "void" as only
3091 parameter.
3092 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3093 comparing types. Use c_type_promotes_to when promoting argument
3094 types.
3095 (finish_function): Use c_type_promotes_to when promoting argument
3096 types.
3097 (build_null_declspecs): Handle atomic_p in declspecs.
3098 (declspecs_add_qual): Handle RID_ATOMIC.
3099 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3100 (c_token_starts_declspecs): Handle RID_ATOMIC.
3101 (c_parser_declspecs): Handle atomic type specifiers and
3102 qualifiers.
3103 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3104 from types of expressions with atomic type.
3105 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3106 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3107 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3108 (c_parser_statement_after_labels, c_parser_switch_statement)
3109 (c_parser_for_statement, c_parser_expr_no_commas)
3110 (c_parser_conditional_expression, c_parser_binary_expression)
3111 (c_parser_cast_expression, c_parser_unary_expression)
3112 (c_parser_postfix_expression)
3113 (c_parser_postfix_expression_after_primary, c_parser_expression):
3114 Use convert_lvalue_to_rvalue.
3115 (c_parser_expression_conv, c_parser_expr_list): Document
3116 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3117 (c_parser_objc_synchronized_statement): Use
3118 convert_lvalue_to_rvalue.
3119 (c_parser_objc_selector): Handle RID_ATOMIC.
3120 (c_parser_objc_receiver, c_parser_array_notation): Use
3121 convert_lvalue_to_rvalue.
3122 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3123 _Atomic (type-name).
3124 (struct c_declspecs): Add atomic_p field.
3125 (convert_lvalue_to_rvalue): Declare.
3126 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3127 corresponding atomic types.
3128 (qualify_type): Don't add _Atomic qualifiers from second argument.
3129 (comp_target_types): Do not allow _Atomic mismatches.
3130 (type_lists_compatible_p): Do not remove atomic qualifiers when
3131 comparing types.
3132 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3133 (build_atomic_assign): New functions.
3134 (build_unary_op): Use build_atomic_assign for atomic increment and
3135 decrement.
3136 (build_conditional_expr): Do not treat _Atomic void as a qualified
3137 version of void.
3138 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3139 (find_anonymous_field_with_type, convert_to_anonymous_field)
3140 (convert_for_assignment): Do not remove atomic qualifiers when
3141 comparing types.
3142 (digest_init): Do not accept initialization of arrays of atomic
3143 elements by string constants.
3144 (build_asm_expr): Use convert_lvalue_to_rvalue.
3145 (build_binary_op): Do not treat _Atomic void as a qualified
3146 version of void.
3147
0c249d4b
DD
31482013-11-06 DJ Delorie <dj@redhat.com>
3149
3150 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3151 both explicit and builtin, print the location of the explicit one.
3152
6d7f7e0a
TB
31532013-11-05 Tobias Burnus <burnus@net-b.de>
3154
3155 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3156 c_parser_omp_distribute, c_parser_omp_teams,
3157 c_parser_omp_target, c_parser_omp_declare): Handle
3158 -fopenmp-simd.
3159
b906f4ca
MP
31602013-11-03 Marek Polacek <polacek@redhat.com>
3161
3162 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3163
ee1d5a02
JJ
31642013-11-01 Jakub Jelinek <jakub@redhat.com>
3165
3166 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3167 check_dup_generic at the end, unless remove is true.
3168 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3169 remove = true;.
3170 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3171
5a9785fb
JJ
31722013-10-31 Jakub Jelinek <jakub@redhat.com>
3173
3174 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3175 with decl that is not pointer nor array.
3176
939b37da
BI
31772013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3178
3179 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3180 a spawning function is found.
3181 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3182 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3183 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3184 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3185 case.
3186 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3187 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3188 expr.
3189 (c_finish_return): Added a check to reject _Cilk_spawn in return
3190 expression.
3191 (build_cilk_spawn): New function.
3192 (build_cilk_sync): Likewise.
3193 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3194
d4af74d4
TB
31952013-10-27 Tobias Burnus <burnus@net-b.de>
3196
3197 PR other/33426
3198 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3199 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3200 (c_parser_statement_after_labels): Update calls.
3201
d73749df 32022013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3203
3204 PR other/33426
3205 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3206 Handle PRAGMA_IVDEP.
3207 (c_parser_statement_after_labels): Update call.
3208
f28aa681
MP
32092013-10-24 Marek Polacek <polacek@redhat.com>
3210
3211 * c-parser.c (c_parser_struct_declaration): Add a comment.
3212 (c_parser_declarator): Don't allow _Alignas here.
3213
0645c1a2
AM
32142013-10-17 Andrew MacLeod <amacleod@redhat.com>
3215
3216 * c-parser.c: Include omp-low.h.
3217 * c-typeck.c: Likewise.
3218
568a31f2
MP
32192013-10-17 Marek Polacek <polacek@redhat.com>
3220
3221 PR c/58267
3222 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3223 Document syntax of the array-declarator.
3224 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3225 are not permitted.
3226 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3227 (c_parser_struct_declaration): Likewise.
3228 (c_parser_declarator): Likewise.
3229 (c_parser_direct_declarator_inner): Likewise.
3230 (c_parser_parameter_declaration): Likewise.
3231 (c_parser_type_name): Likewise.
3232
acf0174b
JJ
32332013-10-11 Jakub Jelinek <jakub@redhat.com>
3234
3235 * c-lang.h (current_omp_declare_target_attribute): New extern
3236 decl.
3237 * c-parser.c: Include c-lang.h.
3238 (struct c_parser): Change tokens to c_token *.
3239 Add tokens_buf field. Change tokens_avail type to unsigned int.
3240 (c_parser_consume_token): If parser->tokens isn't
3241 &parser->tokens_buf[0], increment parser->tokens.
3242 (c_parser_consume_pragma): Likewise.
3243 (enum pragma_context): Add pragma_struct and pragma_param.
3244 (c_parser_external_declaration): Adjust
3245 c_parser_declaration_or_fndef caller.
3246 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3247 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3248 Adjust recursive call.
3249 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3250 of pragma_external.
3251 (c_parser_parameter_declaration): Use pragma_param instead of
3252 pragma_external.
3253 (c_parser_compound_statement_nostart, c_parser_label,
3254 c_parser_for_statement): Adjust
3255 c_parser_declaration_or_fndef callers.
3256 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3257 it through to c_parser_conditional_expression.
3258 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3259 pass it through to c_parser_binary_expression. Adjust recursive
3260 call.
3261 (c_parser_binary_expression): Remove prec argument, add
3262 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3263 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3264 binop matches it, use build2 instead of parser_build_binary_op.
3265 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3266 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3267 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3268 Handle pragma_struct and pragma_param the same as pragma_external.
3269 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3270 (c_parser_omp_variable_list): Parse array sections for
3271 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3272 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3273 (c_parser_omp_clause_reduction): Handle user defined reductions.
3274 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3275 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3276 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3277 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3278 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3279 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3280 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3281 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3282 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3283 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3284 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3285 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3286 (c_parser_omp_for_loop): Add CODE argument, pass it through
3287 to c_finish_omp_for. Change last argument to cclauses,
3288 and adjust uses to grab parallel clauses from the array of all
3289 the split clauses. Adjust c_parser_binary_expression,
3290 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3291 (omp_split_clauses): New function.
3292 (c_parser_omp_simd): New function.
3293 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3294 Allow the function to be called also when parsing combined constructs,
3295 and call c_parser_omp_simd when parsing for simd.
3296 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3297 #pragma omp section, require exactly one structured-block instead of
3298 sequence of statements.
3299 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3300 Allow the function to be called also when parsing combined constructs.
3301 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3302 Allow the function to be called also when parsing combined
3303 constructs.
3304 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3305 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3306 c_parser_omp_teams, c_parser_omp_target_data,
3307 c_parser_omp_target_update, c_parser_omp_target,
3308 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3309 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3310 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3311 (c_parser_omp_construct): Add p_name and mask vars. Handle
3312 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3313 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3314 and c_parser_omp_sections callers.
3315 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3316 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3317 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3318 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3319 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3320 OMP_CLAUSE_DEPEND.
3321 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3322 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3323 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3324 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3325 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3326 * c-typeck.c: Include tree-inline.h.
3327 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3328 handle_omp_array_sections_1, handle_omp_array_sections,
3329 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3330 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3331 user defined reductions.
3332 (c_tree_equal): New function.
3333 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3334 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3335 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3336 c_check_omp_declare_reduction_r): New prototypes.
3337 * c-decl.c (current_omp_declare_target_attribute): New variable.
3338 (c_decl_attributes): New function.
3339 (start_decl, start_function): Use it instead of decl_attributes.
3340 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3341 c_omp_reduction_decl, c_omp_reduction_lookup,
3342 c_check_omp_declare_reduction_r): New functions.
3343
0a6c2227
TT
33442013-09-25 Tom Tromey <tromey@redhat.com>
3345
3346 * Make-lang.in (c/gccspec.o): Remove.
3347 (CFLAGS-c/gccspec.o): New variable.
3348 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3349 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3350 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3351
f3bc55f0
TT
33522013-09-25 Tom Tromey <tromey@redhat.com>
3353
3354 * Make-lang.in (c/gccspec.o): Don't use subshell.
3355
a24d975c
MP
33562013-09-18 Marek Polacek <polacek@redhat.com>
3357
3358 PR sanitize/58443
3359 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3360 Remove unnecessary check.
3361
ce6923c5
MP
33622013-09-18 Marek Polacek <polacek@redhat.com>
3363
3364 PR sanitizer/58411
3365 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3366 no_sanitize_undefined attribute.
3367
a1e51df9
KT
33682013-09-13 Kai Tietz <ktietz@redhat.com>
3369
3370 PR target/57848
3371 * c-decl.c (c_builtin_function_ext_scope): Remove
3372 wrong assumption that it is never called on prexisting
3373 symbol.
3374
0af94e6f
JR
33752013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3376
3377 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3378
20059c8b
GDR
33792013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3380
3381 * c-objc-common.c (c_tree_printer): Tidy.
3382
de5a5fa1
MP
33832013-08-30 Marek Polacek <polacek@redhat.com>
3384
3385 * c-typeck.c (build_binary_op): Add division by zero and shift
3386 instrumentation.
3387
2531a1d9 33882013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3389 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3390
6e2bcc98 3391 PR c/35649
2531a1d9
JR
3392 * c-typeck.c (c_common_type): Prefer double_type_node over
3393 other REAL_TYPE types with the same precision.
3394 (convert_arguments): Likewise.
3395
025311c4
GDR
33962013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3397
3398 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3399 (c_initialize_diagnostics): Call a destructor for the early printer.
3400
da6ca2b5
GDR
34012013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3402
3403 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3404 printer initialization.
3405
318cda85 34062013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3407
318cda85
BI
3408 PR c/57490
3409 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3410 check for truth values.
3411 (expand_array_notation_exprs): Added truth values case. Removed an
3412 unwanted else. Added for-loop to walk through subtrees in default
3413 case.
3414
b066401f
GDR
34152013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3416
3417 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3418
fb48aadc
JM
34192013-07-23 Joseph Myers <joseph@codesourcery.com>
3420
3421 * c-parser.c (struct c_generic_association): Fix typo.
3422
433cc7b0
TT
34232013-07-23 Tom Tromey <tromey@redhat.com>
3424 Joseph Myers <joseph@codesourcery.com>
3425
3426 * c-parser.c (struct c_generic_association): New.
3427 (c_generic_association_d): New typedef.
3428 (c_parser_generic_selection): New function.
3429 (c_parser_postfix_expression): Handle RID_GENERIC.
3430
26d40c3d
JM
34312013-07-13 Jason Merrill <jason@redhat.com>
3432
3433 PR c++/57793
3434 * c-decl.c (finish_struct): Check for too-large class.
3435
ecdbd01a 34362013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3437
3438 PR c/57821
3439 * c-typeck.c (set_init_index): When folding, check for index overflow.
3440
1141ed3f
BI
34412013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3442
3443 * c-parser.c (c_parser_array_notation): Removed rejection of array
3444 notations in an array of function pointers.
3445
713b46fa
BI
34462013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3447
3448 * c-array-notation.c (make_triplet_val_inv): New function.
3449 (create_cmp_incr): Likewise.
3450 (create_array_refs): Likewise.
3451 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3452 Also modularized common parts between functions and called the function.
3453 (build_array_notation_expr): Likewise.
3454 (fix_conditional_array_notations_1): Likewise.
3455 (fix_array_notation_expr): Likewise.
3456 (fix_array_notation_call_expr): Likewise.
3457
92f20202
MP
34582013-06-18 Marek Polacek <polacek@redhat.com>
3459
3460 PR c/57630
3461 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3462
73a23b06
BI
34632013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3464
3465 * c-array-notation.c (build_array_notation_expr): Reject array notation
3466 mismatch between LHS and RHS even inside a call_expr. Also, removed
3467 a couple while statements that were dead code.
3468
00b8517d
BI
34692013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3470
3471 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3472 excessive precision expressions in function parameters. Also removed
3473 couple unwanted while statements.
3474
1509bdda
BI
34752013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3476
3477 * c-array-notation.c (expand_array_notation_exprs): Added
3478 ARRAY_NOTATION_REF case.
3479
d60f1706
BI
34802013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3481
3482 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3483 function to c-family/array-notation-common.c.
3484 (is_cilkplus_reduce_builtin): Likewise.
3485 (find_rank): Likewise.
3486 (extract_array_notation_exprs): Likewise.
3487 (replace_array_notations): Likewise.
3488 (find_inv_trees): Likewise.
3489 (replace_inv_trees): Likewise.
3490 (contains_array_notation_expr): Likewise.
3491 (find_correct_array_notation_type): Likewise.
3492 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3493 (struct inv_list): Moved this to c-family/array-notation-common.c.
3494 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3495
6d6efbb3
BI
34962013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3497
3498 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3499 reduction functions outside the for-loop. Added a check if the fundecl
3500 is non-NULL. Finally, removed an unwanted if-statement, and made the
3501 body unconditional.
3502
25c22937
BI
35032013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3504
3505 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3506 condition of the if-statement matches the rank of else-block and then-
3507 block when array notations are used.
3508 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3509 expression after the entire function body is parsed.
3510 (c_parser_expr_no_commas): Delayed creating array notation expressions
3511 to the end of function parsing.
3512 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3513 whole if-statement instead of just the condition.
3514 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3515
edd25645
BI
35162013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3517
3518 PR c/57474
3519 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3520 array to NULL_TREE if they are unused. Also added a check for the
3521 field to be NULL before its fields are used in future.
3522
065ce7f1
RO
35232013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3524
3525 PR bootstrap/57450
3526 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3527 (build_array_notation_expr): Likewise.
3528
36536d79
BI
35292013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3530
3531 * c-typeck.c (build_array_ref): Added a check to see if array's
3532 index is greater than one. If true, then emit an error.
3533 (build_function_call_vec): Exclude error reporting and checking
3534 for builtin array-notation functions.
3535 (convert_arguments): Likewise.
3536 (c_finish_return): Added a check for array notations as a return
3537 expression. If true, then emit an error.
3538 (c_finish_loop): Added a check for array notations in a loop
3539 condition. If true then emit an error.
3540 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3541 (build_binary_op): Added a check for array notation expr inside
3542 op1 and op0. If present, we call another function to find correct
3543 type.
3544 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3545 * c-parser.c (c_parser_compound_statement): Check if array
3546 notation code is used in tree, if so, then transform them into
3547 appropriate C code.
3548 (c_parser_expr_no_commas): Check if array notation is used in LHS
3549 or RHS, if so, then build array notation expression instead of
3550 regular modify.
3551 (c_parser_postfix_expression_after_primary): Added a check for
3552 colon(s) after square braces, if so then handle it like an array
3553 notation. Also, break up array notations in unary op if found.
3554 (c_parser_direct_declarator_inner): Added a check for array
3555 notation.
3556 (c_parser_compound_statement): Added a check for array notation in
3557 a stmt. If one is present, then expand array notation expr.
3558 (c_parser_if_statement): Likewise.
3559 (c_parser_switch_statement): Added a check for array notations in
3560 a switch statement's condition. If true, then output an error.
3561 (c_parser_while_statement): Similarly, but for a while.
3562 (c_parser_do_statement): Similarly, but for a do-while.
3563 (c_parser_for_statement): Similarly, but for a for-loop.
3564 (c_parser_unary_expression): Check if array notation is used in a
3565 pre-increment or pre-decrement expression. If true, then expand
3566 them.
3567 (c_parser_array_notation): New function.
3568 * c-array-notation.c: New file.
3569 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3570
cd192ccc
MS
35712013-05-23 Mike Stump <mikestump@comcast.net>
3572
3573 * c-typeck.c (convert_for_assignment): Handle references to memory
3574 spaces better.
3575
427b248d
JM
35762013-05-16 Jason Merrill <jason@redhat.com>
3577
3578 * Make-lang.in (cc1$(exeext)): Use link mutex.
3579
44d90fe1
PC
35802013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3581
3582 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3583 to simply use OPT_Wpointer_arith.
3584 (build_unary_op): Likewise.
3585
4e7d7b3d
JJ
35862013-04-03 Jakub Jelinek <jakub@redhat.com>
3587
3588 PR c/19449
3589 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3590 argument. If set, or it temporarily for parsing of the first
3591 argument into force_folding_builtin_constant_p.
3592 (c_parser_postfix_expression): Adjust callers.
3593
839b422f
RB
35942013-03-21 Richard Biener <rguenther@suse.de>
3595
3596 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3597 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3598
2ee028f1
MP
35992013-02-12 Marek Polacek <polacek@redhat.com>
3600
3601 PR c/44938
3602 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3603 origtypes to NULL.
3604
8824edff
JJ
36052013-01-24 Jakub Jelinek <jakub@redhat.com>
3606
3607 PR c/56078
3608 * c-typeck.c (set_nonincremental_init_from_string): If
3609 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3610 returned false.
3611 (process_init_element): Likewise.
3612
eadd3d0d
JJ
36132012-12-20 Jakub Jelinek <jakub@redhat.com>
3614
3615 PR c++/55619
3616 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3617 argument, don't call default_function_array_conversion
3618 nor c_fully_fold here.
3619 (c_parser_asm_statement): Adjust callers.
3620 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3621 and outputs here, and call default_function_array_conversion
3622 on inputs that don't need to be addressable.
3623
f8a93a2e
JJ
36242012-12-18 Jakub Jelinek <jakub@redhat.com>
3625
3626 PR c/39464
3627 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3628 warning require that both c_common_unsigned_type as well as
3629 c_common_signed_type is the same for both mvl and mvr types.
3630
9771b263
DN
36312012-11-16 Diego Novillo <dnovillo@google.com>
3632
3633 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3634
3635 * c-common.c: Use new vec API in vec.h.
3636 * c-common.h: Likewise.
3637 * c-gimplify.c: Likewise.
3638 * c-pragma.c: Likewise.
3639 * c-pretty-print.c: Likewise.
3640 * c-pretty-print.h: Likewise.
3641 * c-semantics.c: Likewise.
3642 * c-decl.c: Likewise.
3643 * c-parser.c: Likewise.
3644 * c-tree.h: Likewise.
3645 * c-typeck.c: Likewise.
3646
880661a4
JW
36472012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3648
3649 PR c++/54930
3650 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3651
077d1abe
MLI
36522012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3653
3654 PR c/53066
3655 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3656 shadows a function, unless the variable is a function or a
3657 pointer-to-function.
3658
3a785c97
JJ
36592012-10-12 Jakub Jelinek <jakub@redhat.com>
3660
3661 PR c/54381
3662 * c-parser.c (struct c_tree_loc_pair): Removed.
3663 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3664 add location_t * and tree * arguments, fill in array of 3
3665 sizeof_arg trees and corresponding locs.
3666 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3667 c_parser_expr_list callers.
3668 (c_parser_postfix_expression_after_primary): Likewise. Pass
3669 array of 3 sizeof_arg trees and locs (corresponding to first
3670 3 arguments) to sizeof_pointer_memaccess_warning.
3671
703c8606
LC
36722012-10-09 Lawrence Crowl <crowl@google.com>
3673
3674 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3675 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3676 hash table.
3677
5d9de0d0
PC
36782012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3679
3680 PR c++/54194
3681 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3682 call.
3683
a212e43f
MG
36842012-10-09 Marc Glisse <marc.glisse@inria.fr>
3685
3686 PR c++/54427
3687 * c-typeck.c: Include c-common.h.
3688 (enum stv_conv): Moved to c-common.h.
3689 (scalar_to_vector): Moved to c-common.c.
3690 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3691 * Make-lang.in: c-typeck.c depends on c-common.h.
3692
3b78de56
AC
36932012-10-04 Arnaud Charlet <charlet@adacore.com>
3694
3695 * c-decl.c (c_write_global_declarations): Fix handling of
3696 -fdump-ada-spec*.
3697
78c60e3d
SS
36982012-09-30 Sharad Singhai <singhai@google.com>
3699
3700 * c-decl.c (c_write_global_declarations): Use a different method
3701 to determine if the dump has ben initialized.
3702
9f33203d
JM
37032012-09-14 Joseph Myers <joseph@codesourcery.com>
3704
3705 PR c/54552
3706 * c-typeck.c (c_cast_expr): When casting to a type requiring
3707 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3708 c_fully_fold first.
3709
a27d595d
JM
37102012-09-14 Joseph Myers <joseph@codesourcery.com>
3711
3712 PR c/54103
3713 * c-typeck.c (build_unary_op): Pass original argument of
3714 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3715 any C_MAYBE_CONST_EXPR, if it has integer operands.
3716 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3717 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3718 to c_objc_common_truthvalue_conversion, then remove any
3719 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3720 c_objc_common_truthvalue_conversion not
3721 c_common_truthvalue_conversion.
3722 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3723 call note_integer_operands for arguments with integer operands
3724 that are not integer constants.
3725
9feb29df
JJ
37262012-09-13 Jakub Jelinek <jakub@redhat.com>
3727
3728 PR c/54559
3729 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3730 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3731
d409320c
JJ
37322012-08-31 Jakub Jelinek <jakub@redhat.com>
3733
3734 PR c/54428
3735 * c-convert.c (convert): Don't call fold_convert_loc if
3736 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3737 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3738 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3739
6265d07c
JJ
37402012-08-24 Jakub Jelinek <jakub@redhat.com>
3741
3742 PR c/54355
3743 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3744 for nested and empty_ok arguments in the call to
3745 c_parser_declaration_or_fndef.
3746
1a4049e7
JJ
37472012-08-17 Jakub Jelinek <jakub@redhat.com>
3748
3749 * c-tree.h (c_last_sizeof_arg): Declare.
3750 * c-parser.c (struct c_tree_loc_pair): New type.
3751 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3752 non-NULL.
3753 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3754 (c_parser_postfix_expression_after_primary): Likewise. Call
3755 sizeof_pointer_memaccess_warning if needed.
3756 (sizeof_ptr_memacc_comptypes): New function.
3757 * c-typeck.c (c_last_sizeof_arg): New global variable.
3758 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3759
0229aee9
UB
37602012-07-24 Uros Bizjak <ubizjak@gmail.com>
3761
3762 * c-lang.h (lang_decl): Add variable_size GTY option.
3763
7ee2468b
SB
37642012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3765
3766 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3767 * Make-lang.in: Fix dependencies.
3768
d4a10d0a
SB
37692012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3770
3771 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3772 and add language Makefile hooks.
3773 * config-lang.in: New file.
3774 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3775 add the required "normal" config-lang.in rules.
3776 * c-lang.h: Moved from gcc/ to here.
3777 * c-tree.h: Likewise.
3778 * c-objc-common.c: Likewise.
3779 * c-objc-common.h: Likewise.
3780 * c-typeck.c: Likewise.
3781 * c-convert.c: Likewise.
3782 * c-lang.c: Likewise.
3783 * c-aux-info.c: Likewise.
3784 * c-errors.c: Likewise.
3785 * gccspec.c: Likewise.
3786 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3787 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3788\f
818ab71a 3789Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3790
3791Copying and distribution of this file, with or without modification,
3792are permitted in any medium without royalty provided the copyright
3793notice and this notice are preserved.